Ultimate Category Excluder for WordPress

Ultimate Category Excluder Plugin

Ultimate Category Excluder (UCE) is a WordPress plugin that allows you to quickly and easily exclude categories from your front page, archives, feeds, and searches. Just select which categories you want to be excluded and UCE does all the work for you!

You can download this plugin from the WordPress plugin repository.

This plugin has been particularly handy with categories that house useful content, but content that I don't want to have appear on the homepage or in my feeds. For example, I have a number of definitions for technical terms and while these can help users reading my content, there's no need to have a definition appear on my homepage or get pushed out via my RSS feeds.

Ultimate Category Excluder Plugin Screenshot

If you have a feature request or have found a bug, please report it below.

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.60 out of 5)


  1. With WPML installed, Ultimate Category Excluder causes the main menu on the second language side to also include all main menu options from the primary language, doubling the number of menu options on the second language side.

    I had to deactivate Ultimate Category Excluder.

    • Thanks for reporting the issue.

  2. Hi,

    Plugin not excluding post category from my front page. Please can you help.

    UCE version: 1.1
    PHP version: 7.4.33
    WordPress version: 6.3.1
    Theme: diver_child is version
    Number of categories is: 5

    • Some themes and widgets bypass my plugin so you'll unfortunately need to look for another solution.

  3. Hi,
    i like your plugin, it helps a lot!
    But although i mark a category as to be exclude in the search results it still gets shown in the seaarch nresults, so that external users can still find the post i tried to exclude. Can you tell me, if and when this will be fixed?

    UCE version: 1.1
    PHP version: 8.0.29
    WordPress version: 6.1.3
    Theme: astra
    Number of categories is: 3

    • Are you talking about search results in Google? The plugin doesn't affect those.

      • No I'm talking about search results on our homepage.

        • Assuming you've specified the category should be excluded from the search page, it should work. There are no known issues or other bug reports about search results. It could be your search results are incompatible with the plugin e.g. if the search results are AJAX-powered then my plugin may not have any impact.

  4. Thank you for the plugin, wondering why categories for custom post types are not appearing in the list?

    • It wasn't designed to recognize categories for custom post types.

  5. thanks for the "ultimate category excluder“ plugin!

    I use the gutenberg block "category list" to display an overview to the sites categories. In this pull down menu every category is displayd with its number of posts.

    The category I want to exclude from this list is the category "uncategorized". There for I use the settings of "ultimate category excluder".

    With these settings it works pretty well, the number of blog posts of "uncategorized" is displayd as 0. But unfortunately the category itself is shown by name.

    What can I do to exclude the category name from the list?

    Best regards

    • The plugin doesn't have any hidden settings or tricks, so if you're seeing categories listed after selecting to hide them, it means the plugin isn't compatible with your particular setup.

  6. It will be better it also support for rest api.

    I really want to see like this "Exclude from REST API".

    Anyway great plugin.


  7. Hi Marios

    Great plugin, thanks.
    The plugin works perfect.
    Can it be adapted to show custom front pages for each logged in user, so the user has access to choose.

    -> User registration form - user can select UCE on the form
    -> Preferences save to their profile
    -> A custom home page / front page will show according to their save

    Each time they are logged in they will see their custom page?
    Or do you know how I can accomplish this or of another plugin?

    Kind regards

    • It sounds like you're hoping to do something beyond what my plugin can do.

  8. Hi Marios,
    great plug-in!!

    Do you think is it possible to exclude the categories also in the "caledar" block and "categories" block by gutemberg?
    Thank you

    • The plugin doesn't have the capabilities you've mentioned.

  9. Hi, love the idea of this plug in but it does not exclude product categories which is what I was hoping to do. Anyway you will be updating so this can happen?
    That would make it a great plugin!

    • I'm not actively working on that feature at this time although you're not the first to ask for it.

  10. Sir, I installed Ultimate Category Excluder, activated it and excluded some categories. The Save button was pressed. No categories were excluded from the main page.

    UCE version: 1.1
    PHP version: 5.6.40
    WordPress version: 5.5.3
    Theme: Smpl Skeleton is version 2.1.1
    Number of categories is: 23

    What did I screw up?

    Thank you

    • You probably didn't do anything wrong. It could be the theme you've chosen just isn't compatible with the plugin.

      • Drat.

        While the excluded category remained a link in the Category section, you click on the link and all content has been removed.

  11. Hi Marios,

    Does your plugin also manage wooCommerce categories? I use standard themes.
    But I can not see any wooCommerce Category in your plugin....

    thank you

    • I haven't specifically tested with WooCommerce. If you don't see the WooCommerce categories then it's safe to assume they're not recognized by the plugin.

  12. Hey Marios,

    your plugin is great. Just one issue. I use the Theme Expertly and this allows me to insert inline posts with Shortcode on any posts or pages.
    If I now exclude with your plugin a category from the front page this category doesn’t show up in the inline posts. It seems like this plugin does not just exclude the categories from the front page...

    Do you plan to fix this issue?

    Thanks for your help.

    Best Regards,

    • I don't have any current plans to address this particular issue.

  13. UCE version: 1.1
    PHP version: 7.3.19
    WordPress version: 5.4.2
    Theme: Flatsome Child is version 3.0
    Number of categories is: 8

    Καλησπέρα κύριε Αλεξάνδρου. Βλέπω μόνο 8 κατηγορίες που προφανώς είναι οι default του plugin αλλά δεν βλέπω καμία από τις δικές μου.
    Δεν έχω γνώσεις developing, απλά προσπαθώ να βελτιώσω το σάιτ μου

    • Sorry, I can't say from the information given what the problem might be. The plugin usually just works without having to do anything special.

  14. I'm not sure what you're asking, but I'm not actively working on new features at this time.

  15. the plugin does not work with excluding a category element (Exclude from Front Page?)

    UCE version: 1.1
    PHP version: 7.0.32
    WordPress version: 5.0.3
    Theme: Boevenvangen.nl is version 1.1
    Number of categories is: 34

    • I'm not sure what you mean, but if the plugin isn't doing what you've expected, I would just try another one. There are no hidden settings or tricks for using it. Sometimes themes and other plugins behave in unexpected ways that cause a plugin to not work well.

  16. I'm also having this issue. My theme automatically shows the next and previous blog posts, and my excluded posts are showing up in these locations. Did you find a solution by chance?

  17. I love this plugin but I've come to learn that there is a compatibility issue with the elesticsearch feature now included in Jetpack


    Categories that are excluded from the home page (not search) do not show up in search results.

    Hoping that you can release an update at some point to fix this bug.

  18. I've been using this plugin for many years to hide my Podcast category from the home page and from the main site's RSS feed. But today iTunes pulled our podcast from the directory and said we had no episodes.

    Just curious if something changed lately? I had the Podcast category hidden from the home page and feeds, and I swear if I directly went to the Podcast feed, https://www.mounthermon.org/blog/podcasts/feed/ that it would still show the full feed for that category as I wanted it to, while excluding it from the main site's generic feed, but now it doesn't.

    I know it somehow always worked that way until today when iTunes notified me. Any ideas? I've unchecked the feeds category for now just to get it back online.

    • The plugin hasn't been updated in a while so I don't know why things would've changed with your site. It could be a theme update, another plugin update, or even an update to the WordPress core has changed something.

  19. Hi

    Im using the category excluder on multiple websites and it works great.

    Feedback: It would be nice if there was an option so that I could add a post with multiple categories and still have it show on the home page. As it stands if a post has multiple categories and one of them is excluded from the home page, the post will not show on the home page.

    Hope that makes sense.

    Best regards


  20. Sadly, while your plugin works great it works too well for me. I am trying to keep specific categories of posts from appearing in the LATEST POSTS displayed on my site kscopetradio.com. I can use your front page control but that prevents me from showing the category anywhere on the home page. I am using the MyThemeShop NewsToday theme. Help?


    • There are no tricks or hidden settings with the plugin. So it either works with your set up or it doesn't. Sorry!

  21. Hi,

    1st - thanks for making this :)

    It's not working as I hoped. When I exclude a category from the home page, it does - that's good.

    Not so good, is that the category is then not displayed in the sidebar widget on any post. Is that how it's supposed to work?

    Please report this information when requesting support.

    UCE version: 1.1
    PHP version: 5.5.38
    WordPress version: 4.9.4
    Theme: Rise is version 1.300.08
    Number of categories is: 5

    • Ideally it should work as you were hoping, but it doesn't always depending on how things are implemented in themes and by other plugins. There are no tricks or hidden settings so maybe another plugin will behave as you desire?

  22. I've installed your plugin and selected some categories to exclude but posts from these excluded categories are still appearing as links in the 'Next Post' and 'Previous Post' post navigation at the end of each blog post.

    Is there a way of getting them to hide from there too? My website uses certain blog posts to create homepage elements like slider images, promotional banners etc and I don't want these to be included in the Next/Previous cycle.


    • There aren't any hidden settings or anything like that so I'd guess the plugin isn't detecting your particular use of next/previous functionality.

      • I'm not sure what you mean by 'my particular use of the next/previous functionality'

        This is just the standard next/previous post navigation in Wordpress that is part of the blog entry

        Screenshot here - http://prntscr.com/iauxw1

  23. When will it be tested with WP 4.9.1?

    • It works fine for me with 4.9.1.

      • Hello Marios,
        thanks for updating. I tried your plugin but expected an additional feature.
        When I click my categories, I wanted to "hide/exclude" a category called "none".

  24. Thank you, thank you and thank you. Is Perfect !!!!!

  25. Not work with Woocommerce category… :-(

  26. Hi,

    Plugin not excluding post category from my front page. Please can you help.

    UCE version: 1.1
    PHP version: 5.3.28
    WordPress version: 4.9
    Theme: Portfolio Press is version 2.7.2
    Number of categories is: 17

    • There are no hidden settings or "tricks" to using the plugin. If it doesn't work as hoped, your theme or another plugin is doing something other than what my plugin is "expecting". Probably best to just try another plugin.

  27. hello. Very nice plugin, thank you. What iam curious about is- if i hide a category - is it hidden from search engines as well? I would like to have some pages that are not visible in my site navigation - but should be accessible through google search. can i do this? thank you.

    • Users and search engines will see the same thing.

  28. Hello,
    I think all of your plugins are great. I use a number of them on my website www.attractionsnearme.co.uk I recently purchased the pro version of Republish old posts because it is so helpful. In regards to Ultimate Category Excluder, my PHP error log occasionally informs me of a timeout error. I don't know if I have a compatibility issue but UCE is often listed. PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/jacko999/public_html/attractionsnearme.co.uk/wp-content/plugins/ultimate-category-excluder/ultimate-category-excluder.php on line 133
    This appears to occur when I am writing large posts on my network at home. Any advice or guidance would be much appreciated.
    Regards Dan

    • Hmmm... that's a new one for me. Have you ever looked into increasing the max execution time for your site?

  29. Hi Marios,

    I experience a problem with a multi language installation. Your plugin works fine for one language but if I change the settings for the second language it overwrites the settings of the first language. Therefore, I can only configure one language.


    Doesn't work:

    I use WPML as a translation plugin. Is there some kind of workaround?


    • Not that I know of. I haven't done much with WPML.

  30. Not all my categories are showing as an option to exclude, especially the one I want to exclude in the first place.

    • I haven't heard about that sort of issue before. Is there anything special about the missing categories? Do they show up in the list of categories on the category page: wp-admin/edit-tags.php?taxonomy=category ?

      Do the missing categories include any special characters?

      • Nothing special about the categories. They are listed here: http://www.transducersdirect.com/wp-admin/edit-tags.php?taxonomy=product_cat&post_type=product. I am also using Woocommerce.

        I am not using any special characters. The list is missing many categories.

        • Sorry, but I'm at a loss as to why you're encountering this issue. If you see any errors on the screen or in your error logs, let me know as they may direct me to the problem.

  31. Unfortunately it does'nt hide sub-categories :-/
    I have a category A with sub-categories a,b and c.
    I wanted to hide all posts of category A from start-page.
    The posts directly in category A were hidden, but i expected, that the posts in the sub-categories also be hidden. But it's not.

    • Did you select the sub-categories to be excluded or did you just select the parent category to be excluded?

      • I only selected the parent-category and expected, that all sub-categories automaticlly also be hidden.
        For me that would be logically and it's the idea of an hierarchie of categories and sub-categories.

        • Yes what you describe is a valid expectation, but so is expecting to have full control over sub-categories which some people do want. Sorry the plugin doesn't behave as you want.

      • Marios, i'm happy that such plugins exist, so there is no reason to say "sorry". :)
        I just would understand how this plugin works, and suggest to add a checkbox "exclude sub-categories" to this plugin.
        Anyway it will be very useful to me, so, thanks for your work!

  32. I'm using this plugin with Divi theme (Elegantthemes). I have a post slider on the homepage that has two posts. I don't want these posts to show in the blog archive but when I exclude them using Category Excluder, then they don't show up in the post slider either. Is there a workaround for this?


    • Sorry, but there are no hidden settings or anything.

      • So no solution?

        • Correct. There's no existing solution for the case you've described.

  33. This is a really nice plugin and does what I wanted to with a very simple interface that is quite easy to use. The only problem I'm having is for some reason when I activate and use this plugin it makes a static menu show up on my mobile site. Only the mobile site though. Any ideas?

    • That's strange. I don't know why a menu would appear on mobile unless the theme was set up to do just that.

  34. Hi Marios. Thanks for developing this plug-in. (btw I was also expecting Bolek's use case above to be supported.)

    Right now I'm struggling to prevent my posts being excluded from the category feeds. I've excluded categories from the homepage, archives and search but they are now also missing from http://[domain]/category/[categoryName]/feed/

    Any thoughts?

    • The plugin works by intercepting requests for posts and then modifying those requests. The challenge is that "who" is making the requests isn't always identified so I don't have a way to determine when and when not to modify the post list. From what you're describing the request to generate a category feed is being interpreted as another type of request which is resulting in the exclusion. There are no tricks or secret settings that you're missing.

      • Thanks for your reply Marios.

        Exclude from Feeds doesn't seem to do anything - the posts are still in the feeds with the following URL format:


        What I want to do is have posts in two categories excluded from everything but the RSS feed, unless they are in other categories as well.

        If I could get all categories but those two excluded from a general RSS feed then I could make that work... please could you explain how the 'Exclude from feeds' works? Which feeds?

        • Excluding from the feed keeps things out of the main feed.

      • Hi Marios,

        Just downloaded it to my website and I have no "options" to chose the categories to exclude?

        Do you have a user guide?!

        • Check out Settings -> Category Excluder

  35. Hello - I've just started using your plugin and it works to hide the categories selected. However, for some reason, it is also hiding the Author Box at the bottom of the posts, as well as the Comment box. Therefore, a reader will not be able to leave a comment on the posts in the hidden category.

    Is there a way to get the Author Box and Comment Box back for these posts?

    I look forward to hearing back from you - thank you for your time!

    • That's unexpected behavior that I haven't heard about before. My guess is there's some incompatibility with your theme.

      • Any ideas for a work-around?

        We are using the Olsen Pro theme from cssignitor .
        Have you heard of any incompatibility with any other plugins?

        This is the only plugin I have found that hides the categories from the front page and feed, but it's pretty important to be able to have the comments available.

        In case this helps, in the hidden category posts, I can click on the 0 Comments link at the top of the post and this brings up the Comment box. I can then leave a comment and post it, but of course it does not show up - since the Comment box doesn't appear.

        I realize this is a free plugin and that your time is limited - I appreciate that. But if you have any suggestions on how to fix this issue, I would be grateful. Thank you.

        • No I haven't heard about incompatibilities. Some folks have tried to hide things from the homepage post listing while not hiding things from widgets on the homepage, but I don't have a solution for that particular issue yet.

      • Hi there

        i installed and activate the plugin but i can't find in it in the menus of WP.
        Could you please let me know how can i find it to edit the option.
        My wordpress version 4.6

        Kind Regards

        • Go to Settings --> Category Exclusion.

  36. Thanks for the plugin.

    I have excluded the category I want from my main page, but I would like the posts in this category to nonetheless appear in My Recent Posts widget. How can I do this?


    • I've been working on this very feature, but so far I've failed to find a way to do it. I may come up with a solution still, but there's no way for me to know the timing.

  37. I am using SQLite Integration plugin.
    Everything works fine, but the console logs:

    Warning: mysqli_get_server_info() expects parameter 1 to be mysqli, object given in /Users/andy/Sites/smmio/wp-content/plugins/ultimate-category-excluder/ultimate-category-excluder.php on line 93

    I just removed the line and then everything is fine...


    • That's known issue (it's a warning, not an error), but the function is only used on the admin screen to provide some diagnostic information that appears under the Support heading. The warning doesn't affect the behavior of the plugin.

  38. Thanks a lot for this excellent plugin doing what's expected ...
    I have one question related to the post count in archives...

    I currently have 18 posts in all categories
    I excluded 2 categories from the archive page ( 8 posts)

    In my footer Archive widget, the displayed total posts in June 2016 is 18 which reflects the overall count... should not it be 10 ( overall - excluded ) ???

    Is there a way to patch it ?

    • Chances are that the widget is doing its own count outside of any other logic on the page. As such it's bypassing the plugin and so the count is off. I don't know of a universal way to intercept requests from the many different widgets out there that might be counting posts.

  39. Hello I need your help...I have created a movie site where I embed code from some file sharing sites. I am doing them manually. I have about 60+ movies added. I also want some post from certain categories to be excluded and your plugin works great! My only problem is the page navigation at the button is gone.. I tried to change in to true but it only have added 1 page navi.

    Please take a look at my website...

    PS. When I tried to uninstall UCE the page navigations are back to normal...Do you have some solutions for this?


    • That sounds like some incompatibility. But I'm not familiar with your theme or other plugins to be able to say what the problem might be. If you see an error message anywhere, let me know as that would be something I could act on.

      • Actually there is no error. Its just the navigation for pages are gone at the bottom of the posts. Before i activated the UCE it shows 4 pages, 1,2,3, &4 but now even if I change the (false) code into (true) it will only give my page 1 which is also linked to the homepage...I would love to give you an access to my editor page if you need to..tnx

        • Sorry for the trouble you're having with the plugin. Unfortunately, this is a free plugin so I can't dedicate the time to go into individual installations to try and identify conflicts or other problems. If there was an error generated by my plugin, I would investigate as it would clearly indicate a problem with the plugin. Without an error I could spend hours looking into what the issue is...

  40. Hello, I have an issue... I have about 30 categories on my site, I've exclued all of them from the homepage - all but one (it's a "news" category). But sometimes, my client wants to have post from a different category to be shown on the homepage. I've tried to put one post into two categories - logical, isn't it? But it doesn't work with your plugin :( If a post is in the "news " category - it shows on the home page. If its in the "news" and "other" category - it doesn't show on the homepage. Can you help somehow?

    • The plugin is designed to look for a matching category and exclude if the match is found. There aren't any settings that allow you to override this or to tell the plugin that there are exceptions. Do you use tags? If not, maybe you could use tags to control what shows on the front page?

      • I don't get it... I have category A and category B, category B is excluded from the home page. And a certain post is added both to A and B category; this post should be visible on the home page, hence the A category is visible...

        • The plugin asks the question "should this post be excluded?" Not, "should this post be included?". It's a slight difference, but it means that as posts are being examined, the question returns with an answer of "yes this post should be excluded" because it is part of category B. And once it's been excluded, there isn't anything that counters that directive even though it's assigned to another category that hasn't been excluded.

  41. Hi,
    I have a category of pages in my site. And I am trying to hide the sub-categories on my front-page using Ultimate Excluder but unfortunately its not working. Any idea how can I resolve this issue. Thanks.

    • Sorry, but from your description I can't tell why it might not be working for you. Do you have debugging turned on? Are you seeing any errors? Are the posts in the sub-category you're excluding assigned to other categories as well? I just excluded a sub-category from my front page to make sure nothing was broken in the current release.

      • I dont see any errors. Basically I have Categories A,B & C having sub-categories a,b & c respectively. I am using HTML5blank theme, where I am linking these categories to Menus AMenu, BMenu & CMenu. So on my front page, along with these three menus, I also see a,b,c under the main menus.

        • And you've blocked a, b, c from the front page, but you still see posts appearing from them? And these posts are assigned to just the a, b, and c categories?

        • Thats right!!

        • OK. That configuration should work. It's what I tested on my test site and the posts from the sub-categories didn't appear in the front-page listing. So it's strange that your posts still show up. The only thing I can think of is to turn on debugging and see if there are errors reported. Perhaps there's a conflict with another plugin.

  42. Hi Marios,

    Thank you for this very useful plugin.

    However, I have a little issue with it. I created an article category, that I would like to be "hidden" on my website, but visible in the category feed (www.mysite.com/category/mycategory/feed). So, i choosed these checkboxes in your plugin : "Exclude from Main Page", "Exclude from Archives" and "Exclude from Search".

    When I go to my principal RSS feed (www.mysite.com/feed), I see my articles. But when I go to that particular category feed (www.mysite.com/category/mycategory/feed), there's nothing...

    Thank you in advance for your help !

    • Hi Marios,

      Could you please help me ?

      • Sorry, but I'm not sure what I can do. The plugin just may not work for your particular setup.

  43. There is an issue with the plugin in that tools that use the xmlrpc interface end up having posts excluded when categories are excluded from the home page. I was able to fix it by adding another clause to your test for the home page:

    if ( $query->is_home && $query->is_main_query() ) {

    Posts still don't show up on the home page, but do show up in Live Writer and Marsedit

    • Thanks for sharing. Looks like I need add an option to allow for people to handle this case.

    • Hi Derek - I'm the developer of MarsEdit and was just looking into finding a workaround for this, so thanks for doing the legwork and sharing it here!

      Marios - great plugin, I'm using it myself but of course I wanted to be able to continue editing category-excluded posts from my own blog editing app.

    • I feel I must point out one shortcoming however with Derek's proposed solution: the excluded posts are then made visible in non-main, but nonetheless visible content such as the "Recent Posts" widget of a blog. It seems like another solution must be found to ensure that the filtering doesn't happen when XMLRPC calls are being made. Maybe a higher priority filter on some XMLRPC hook that will flag disabling the filtering?

    • Sorry for the multiple comments, but I think I have a reasonable solution: add_action on xmlrpc_call will allow the plugin to detect whether the plugin has been activated in the context of an XMLRPC request, and deactivate all its functionality in that scenario. This seems like the safest way to both ensure the plugin has no negative impact on XMLRPC, and to ensure that posts are only excluded when XMLRPC is being used to access the blog. Here's a working example:

      $ksuce_is_xmlrpc = false;
      add_action( 'xmlrpc_call', 'ksuce_ignore_xmlrpc_calls', 1);
      function ksuce_ignore_xmlrpc_calls() {
      global $ksuce_is_xmlrpc;
      $ksuce_is_xmlrpc = true;

      function ksuce_exclude_categories( $query ) {
      global $ksuce_is_xmlrpc;
      print "Got ksuce is xmlrpc $ksuce_is_xmlrpc";
      if ($ksuce_is_xmlrpc == true) {
      return $query;

      • Just wanted to add a quick note here to let you know this has come up again with one of my customers. I am going to direct them to this post but if you have a chance to consider integrating something like the above I think it will help other users, too. At this point it might be worth adapting it to work the same way for REST API.

        • If you have paying customers, I would have them pay for the coding effort to update the plugin. The changes would need to include an on/off switch so that existing users could control if the new functionality is of interest (it would be off by default). I will then merge the update with the existing version.

        • Thanks for the response. I don't think the functionality should have an off switch, any more than there should be an off switch for accessing excluded category posts through the admin panel. In my opinion the current behavior is simply broken with respect to supporting XMLRPC clients.

          I did make the change I proposed here, with no off switch included, if you're interested in accepting the contribution: https://github.com/danielpunkass/ultimate-category-excluder/commit/e79604ac0dc8e151aec075a8926422fadb74a60f

          Thanks again for the attention,

  44. Hi,

    I've searched everywhere for a plugin like yours. I'm having a little issue, though. I want certain posts to be excluded from the category archives and it's achieving that, but it is also removing them from the front page. I"m also getting this message at the bottom of the plugin screen:
    Warning: mysqli_get_server_info() expects parameter 1 to be mysqli, resource given in /nfs/c11/h05/mnt/204622/domains/booksumustread.com/html/wp-content/plugins/ultimate-category-excluder/ultimate-category-excluder.php on line 93

    Is this error the cause of the plugin not working properly?


    • I don't get that error and I have debugging turned on. Could you tell me what version of PHP your server is running?

      • my host has me at 5.3.29

        • OK. So PHP isn't the problem. Can you send me the info that appears at the bottom of the plugin's admin screen?

          Also, is the post that's being excluded assigned to more than one category? And if it is, is one of the categories excluded from the home page?

        • I'm not sure if that last message went through so I'm going to duplicate it because my laptop is a little wonky today. I have child categories set up like this:

          -cozy mystery
          --featured cozy mystery
          --free cozy mystery

          My theme has modules where the category "cozy mystery" is listed on an archive page. If I keep the heirarchy like it is, the --featured cozy mystery and --free cozy mystery show on the cozy mystery archive page. The module is set up to do this. When I use your plug in, the featured cozy mystery category, which is shown on the front page, disappears from the archived page, but also from the front page.

          Here is what the admin screen says:

          Please report this information when requesting support.

          UCE version: 1.0
          PHP version: 5.3.29

          Warning: mysqli_get_server_info() expects parameter 1 to be mysqli, resource given in /nfs/c11/h05/mnt/204622/domains/booksumustread.com/html/wp-content/plugins/ultimate-category-excluder/ultimate-category-excluder.php on line 93
          MySQL version:
          WordPress version: 4.4.2
          Theme: Voice is version 1.3.1
          Number of categories is: 148

        • I looked into the error. It's not likely to be the cause of any problems. The error is generated when a request is made to get the version of the database. Perhaps your version is older and incompatible with the way I'm getting the version number, but even so the code continues to execute and so there's no impact.

          As for your issue, I'm trying to reproduce your settings. I've created the category hierarchy you've described, but I can't figure out from your description which categories you've excluded and from where. Can you indicate what's checked for each of these:

          -cozy mystery
          --featured cozy mystery
          --free cozy mystery

        • okay, so here is the hierarchy:

          Mystery - is the parent category
          Cozy mystery is a child of Mystery
          Featured and Free Cozy Mystery are children of Cozy Mystery

          The categories I'm trying to exclude are Featured and Free, as they are on the main page of my site and I don't want them included in the Cozy Mystery category page page as well. So when I check Featured Cozy Mystery and Free Cozy Mystery under the heading "Exclude from archive", they do, indeed, disappear from the Cozy Mystery category page, but they also disappear from their place on the front page as well. I thought that this was because of the date of the posts on the front page -- they are a few days old as I'm trying to work out a newsletter issue, but I updated one of the Featured Cozy Mystery posts with today's date and it made no difference.

        • I've created the hierarchy you've described.

          I've also set Featured Cozy Mystery and Free Cozy Mystery to be excluded from archives. Otherwise everything else in the UCE plugin is UNCHECKED. Does that match your setup?

          Also, for the posts in each category, do you assign them to the child category only or do you assign them to the parent and child? For example, is a Free Cozy Mystery post categorized as Free Cozy Mystery only or Mystery, Cozy Mystery AND Free Cozy Mystery?

        • As an example I only gave you Cozy Mystery. In reality, I have 8 main genres (Mystery, Thriller, Romance, etc.) 63 sub-genres and from these sub-genres each one has Featured, Free, and Topslider as a child category.

          So on the UCE all of the 63 sub-genre child categories (Featured, Free, Topslider) are checked and the rest is unchecked.

          Each post only has one category, so if I have a psychological thriller that is a featured book on the front page, the category will be Featured Psychological Thriller. If I add an additional category to it, the post will also appear in that category and I don't want that to happen. As it is, the child categories are being show on the sub-category page, which is what I'm trying to hide.

          I know this seems elaborate, but I'm trying to figure out how to link the sub-categories with their connected child categories so the child categories will be included in the subscribers email if they only chose the sub-category.

        • Ah so your setup is a little more complicated than the sample I put in my test environment. I'm not sure where to go from here as I can't reproduce your problem with just the simple setup I've put in place i.e. things are working as I'd expect. I'm also not seeing any errors generated so if I had to guess I'd say we're dealing with 1) a plugin/theme conflict OR 2) the features of my plugin aren't quite matching your expectations.

          On a sort of related note, I'm wondering if you might have an easier time achieving your goals if you combined categories with tags. Categories would cover the genres and sub-genres and tags would cover attributes like featured, free, and topslider. I'm not saying such an approach would work out of the box, but it's an idea that occurred to me so I thought I'd share.

        • Thank you for your time. I will look into using tags. I'm a little new at this so it's taking me a little longer to learn. I appreciate your help

        • WordPress is better than any other system at getting you a site that does 95% of what you want, but that last 5% can be tricky even for experienced folks. Good luck!

      • I'm getting the same error. But I have a much simpler structure than Theresa. I only have 5 categories. No matter which category I select, it is not excluded. Even if I select all categories in all fields, nothing gets excluded - and I only wanted to exclude categories from my main page.

        So far this plugin seems not to be working at all for me. Here is my information (I deleted the domain info):

        UCE version: 1.0
        PHP version: 5.4.45

        Warning: mysqli_get_server_info() expects parameter 1 to be mysqli, resource given in ***/public_html/wp-content/plugins/ultimate-category-excluder/ultimate-category-excluder.php on line 93

        MySQL version:

        WordPress version: 4.4.2

        Theme: Canvas Child is version 1.0.0

        Number of categories is: 5

        • I think the "warning" is a red herring. The particularly piece of code is just used to get the info about the environment and it isn't used to handle any of the exclusions.

          Still, there's obviously something wrong since the plugin isn't working for you. I'm guessing there's a plugin conflict. Could you post a list of the plugins you have activated?

        • Here are the plugins I have activated:

          * BackWPup Version 3.2.0
          Duplicate Post Version 2.6
          Google XML SitemapsVersion 4.0.8
          * Jetpack by WordPress.com Version 3.7
          MF Gig Calendar Version 1.0.3
          Ultimate Category Excluder Version 1.0
          Wordfence Security Version 6.1.3
          * WP Gallery Custom Links Version 1.10.3
          * WP Subtitle Version 2.5

          I need to update the plugins that have an '*', but I'm waiting to solve this current problem with your plugin first.

        • Hello Marious,

          I still can't get your Ultimate Category Excluder plugin to work. I deactivated all of the plugins that I listed one by one (except for MF Gig Calendar, I was afraid of losing my calendar data, which took a long time to input). I then updated the excluded category after each plugin deactivation, and then checked my main page, but I'm still not able to get the Ultimate Category Excluder plugin to work for me. I just need posts excluded from being listed on my main page.

        • Hi Steve. Sorry, but there's not much I can do from my side without some sort of error message to guide me. When I'm working on my own sites and I have unexplained issues, I need to turn on WordPress' debugging and go from there.

  45. Hi
    This does what I want. Great stuff.
    One issue. The posts are removed from the feed based on the category, but the category still remains in the filter list?
    Can this be also hidden in the blog feed?


    • What do you mean by filter list?

      • I have a theme that allows the categories to be set as a filter to show certain posts. Like "Art" would only show art articles with the art category.

        • Ah. That sounds like a theme-specific feature. I don't know how the list is being assembled so I'm not sure what, if any, fix there would be to the plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail.