• Resolved zsolt

    (@zsolt82)


    Hello

    With this code I can change the names of registered advertisers, but not guest advertisers.

    I would like the guest advertiser’s name to remain the original.

    How to solve?

    add_filter( "adverts_tpl_single_posted_by", function() {
    	if( get_post( $post_id )->post_author > 0 ) {
      return '[publishpress_authors_box layout="inline" show_title="false"]';
        } else {
    		
    	return "<span style='color:red'> Guest <strong>%s</strong></span>";
            
        }
      
    } );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    your dynamic function should accept an argument for example function( $content ) and the ‘else’ statement should be

    
    return $content;
    
    Thread Starter zsolt

    (@zsolt82)

    Perfect for

    Thank you

    • This reply was modified 3 years, 8 months ago by zsolt.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘User posted by’ is closed to new replies.