WordPress.org

Ready to get started?Download WordPress

Forums

SEO SearchTerms Tagging 2
Disable plugin on certain pages (6 posts)

  1. www.n1bar.com
    Member
    Posted 2 years ago #

    Hi, I want to disable the plugin on certain pages but it isnt working, i've tried the following.

    function remove_stt2() {
    if ( get_post_type() == 'tribe_events' ) {
    remove_action('wp_head','stt_terms_list');

    http://wordpress.org/extend/plugins/searchterms-tagging-2/

  2. homework
    Member
    Posted 2 years ago #

    I want to know how to disable the plugin on certain pages too.

  3. southcast
    Member
    Posted 2 years ago #

    Since I am not a coder. I do not have a code or a template tag for this, but when I faced the similar problem I did a bit of a work-around which worked for me and I will share it here in case it can help someone.

    What I did is i enabled the plugin but set the "Add list automatically right after post content" to NO. I then applied the below given template tag :

    <?php if(function_exists('stt_terms_list')) echo stt_terms_list() ;?>

    only to selective templates such as my blog-pages and a few other selective pages i wanted it to appear on. Yes, you will need custom page templates in order to achieve this. If you paste the code on the default page template, such as page.php then obviously it will appear in all the pages but if you make a custom page template which is pretty easy to set up BTW, then you can avoid the mess. To illustrate further, i will give an example of my two pages below :

    1. Here is one of my page made on a default page template, which does not have the search terms.

    2. Here is page made on custom template which has the search terms appended to it.

    I too wish there was some easy template tag. But this seems to be the only solution as of now, unless a good hearted coder comes to our rescue. FYI I sought for help in this forum regarding the same issue earlier but sadly no one responded, definitely not the developer. In fact he has not responded to any threads lately.

    Be aware that this is just a work-around and not a permanent solution, but at least better than nothing. Hope this helps someone.

  4. homework
    Member
    Posted 2 years ago #

    That's good! Thanks for sharing this solution. I will use this!

  5. southcast
    Member
    Posted 2 years ago #

    This plugin works on category pages too..just to let know if someone is curious. But in case you consider doing that you may want to avoid it appearing on subsequent pages. I got a code for that if someone is interested, just ask and i will put it here.
    Until next time.
    Cheers guys !

  6. andax
    Member
    Posted 1 year ago #

    Southcast, please post the code, thanks a lot in advance

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic