• Resolved j w

    (@justinmwoodum)


    Hello. We have a category that is used in a slider on our main page. When I set the “Exclude from Archives” option in this plugin for this category, it no longer displays on the main page. The “Exclude from Main Page” option is NOT set (of course).

    I understand this could be an issue in the theme or slider itself, but this is a WooCommerce theme so not too sure. If your plugin interprets any page that loads post excerpts within the loop as an “archive” page, that could be the issue since sliders tend to do this as well.

    Any ideas why this could be happening? Thanks.

    https://wordpress.org/plugins/ultimate-category-excluder/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter j w

    (@justinmwoodum)

    FYI, unfortunately time was short for us so used CSS to hide category instead of using plugin. Using this plugin would be better, of course, since it actually keeps the category from loading, not just hides it visually like CSS. Our Category is called “feature”:

    .archive .category-feature, .blog .category-feature {
    display: none !important;
    }

    Even though OP fixed this issue with CSS, I wanted to share the PHP/plugin fix I just did to solve this problem, in case it’s helpful to others.

    I was having the same issue, specifically in a site that uses a static front page where some custom PHP is pulling in one post each from special categories that are used ONLY to designate content to go on the front page. So I wanted the whole rest of the site except the front page to look like these special categories did not exist.

    In version 0.96 of the plugin, in file ultimate-category-excluder.php, the existing line 139:

    if (!is_admin() && $query->is_archive) {

    changes to look like this instead:

    if (!is_admin() && $query->is_archive && !is_front_page()) {

    And that solves it for me. Now I can click exclude on all pages for all these special categories, and my front page still works as intended.

    Of course, if an update ever becomes available for this plugin, you’d have to be careful to redo this change after running the update.

    Hope this helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude from Archives option hides from Main Page also’ is closed to new replies.