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

    (@gwin)

    Hi, by default tags are not enabled in WPAdverts, you can enable them by adding following code in your theme functions.php

    add_filter('adverts_post_type', 'my_adverts_post_type', 10, 2);
    
    function my_adverts_post_type($args, $type) {
      if($type != 'advert') {
        return $args;
      }
    
      $args["taxonomies"][] = "post_tag";
      return $args;
    }

    This will enable the default tags in Adverts, although i am not sure if it will work with the Automatic Post Tagger plugin as i am not really familiar with it.

    Thread Starter Bonifes

    (@bonifes)

    Thanks a lot! it’s working! Even Automatic post tagger is appending tags to adverts. I needed to specify post type ‘advert’ to APT

    Appears to be a problem though, that if I click on a tag, adverts are not showing… Can only see normal WP posts. [example] the tag automatic or 2006 here <https://ads.richus.org/advert/other-tests/&gt;

    Recommend that the code be added into the plugin file not template (if its possible)

    Kind Regards.

    Plugin Author Greg Winiarski

    (@gwin)

    Hmm that will be rather hard to do because the [adverts_list] shortcode does not allow filtering by tags, also most likely you would need to create tag.php template file in your theme folder and implement there code that will handle displaying Ads by tags.

    This is beyond the free support offered here i am afraid.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can one add Tags to adverts?’ is closed to new replies.