Support » Plugin: WPAdverts - Classifieds Plugin » Remove member ID from expired ads

  • Resolved lazyym

    (@lazyym)



    First off, I love this new feature, bravo! Our SEO is going to explode! Thank you!

    One thing, how can we remove the member info area from expired ads left public?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, thanks!

    Hmm i am not exactly sure what do you mean by member info area, can you paste some screenshot which would explain it?

    I’m sorry, I forgot that info is related to your ads by author snippet: https://github.com/simpliko/wpadverts-snippets/tree/master/ads-by-author

    Is that still doable, to hide this from expired ads easily?

    Plugin Author Greg Winiarski

    (@gwin)

    So if the Ad has expired you would like to hide to remove the link? If so then you can do that by adding the code below in your theme functions.php

    
    add_action( "init", "expired_ads_do_not_link", 1000 );
    function expired_ads_do_not_link() {
      if( is_singular( 'advert' ) && get_post( get_the_ID() )->post_status == "expired" ) {
        remove_filter( "adverts_tpl_single_posted_by", "ads_by_author_tpl_single_posted_by", 10, 2 );
      }
    }
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.