Support » Fixing WordPress » [Plugin: WP-TopBar] How to Display on Categories Page

  • Resolved lettereye


    Hello. I have a page where I do a query for a portfolio category and because of this, my page loses its page ID. I only want top bar on this particular page, though. Is there any other way to make only display on this category page or do I need to dive into the code to do a conditional for tag ID or something other.

    Thanks for you help with this in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I can see how to code that in a future version. Let me know what options you are looking for.

    To fix it yourself, look for the function wptb_inject_TopBar_html_js() in wp-topbar.php.


    Sounds good, thanks. I actually simply solved via css visibility and showing on only the page I wanted. Its not ideal and I lose the animation, but it works.

    I guess if i edited your php file, i would just query the portfolio category instead of the post ID and then enter that category slug in the field where I would enter the page IDs, right?

    I will try that out, but would be great as a feature for future. A lot of sites I’m using like to use that portfolio category feature.

    Thanks for the reply.

    I think you want to use something like:

    foreach((get_the_category($thePostID)) as $category) {
    			if ($category->cat_ID = 1
    if ( $show == 0)
        { return; }

    where “1” is the category you want to include.

    But I haven’t tested this.


    Try version 3.10, just uploaded. It has a new Control tab with the options you wanted.

    This is very awesome. My issue was actually having a portfolio post category listed, but I noticed in the most recent update of wordpress that it is now treated as a page. Therefore, I can now just include the page ID in your interface. However, the feature you added is invaluable for non-pages that you want to display or not display…well done and thank you for the support and feature update!!!! I also like how you made it a separate tab for control. Well done with this plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP-TopBar] How to Display on Categories Page’ is closed to new replies.