Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( "adverts_tpl_single_posted_by", function($content, $post_id) {
- $post = get_post($post_id);
- if($post){
- $profile_url = '#';
- if(class_exists('PeepSoUser')){
- $PeepSoUser = PeepSoUser::get_instance($post->post_author);
- $profile_url = $PeepSoUser->get_profileurl();
- }
- $content = sprintf( __("by <a href='{$profile_url}'><strong>%s</strong></a>", "wpadverts"), esc_html( get_post_meta($post_id, 'adverts_person', true) ) );
- } else {
- $content = "<span style='color:red'> Guest <strong>%s</strong></span>";
- }
- return $content;
- }, 99, 2);
Add Comment
Please, Sign In to add comment