WordPress.org

Ready to get started?Download WordPress

Forums

Excluding Categories from Front Page (8 posts)

  1. jchambo
    Member
    Posted 1 year ago #

    Hey guys,

    I'm trying to Exclude or Limit my categories on the front page of my WordPress theme.

    Theme: Knowhow WordPress Theme

    I've downloaded countless plugins such as "Ultimate Category Excluder" and "Frontpage Category Filter" and the only thing these do for me, is Remove the actual Articles from the category. They don't actually remove the Category itself, but rather the posts underneath it.

    Does anyone know of a way where I can limit the front page categories to oh say.... 6? And for me to be able to identify which ones I would like to keep, rather than me keep adding categories to exclude?

    Thanks!

  2. Aaron
    Member
    Posted 1 year ago #

    I would ask the theme vendor for help on themeforest since this a paid theme. We typically only support the free ones.

  3. jchambo
    Member
    Posted 1 year ago #

    I have asked them, they just advise to hire a Freelancer... obviously, with the amount of people that know WordPress code these days and that post here on the forums, I figured I could ask here.

    Any help is appreciated!

  4. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    This forum and it's users do not have access to Commercial Themes. Your point of support for this theme is with them. That said, try twentyten, eleven, or twelve (or a theme hosted here) and a Child Theme and get great support here.

  5. jchambo
    Member
    Posted 1 year ago #

    I found that I can hide categories that do not have any entries in them by changing the following line of code on my index.php file:

    'hide_empty' => 0,
    to:
    'hide_empty' => 1,

    However, it is still displaying categories on my home page I do not want. I have installed the plug-in: "Ultimate Category Excluder" and it excludes the posts from my home page, but the category still shows up with no posts underneath it.

  6. jchambo
    Member
    Posted 1 year ago #

    Is there something I can add / remove to this code to only feature categories I want? Or add / remove something to get the Ultimate Category Excluder plugin to work?

    $cat_args = array(
      'orderby' => 'name',
      'order' => 'ASC',
      'hierarchical' => true,
      'parent' => 0,
      'hide_empty' => 1,
      'child_of' => 0
    );
  7. jchambo
    Member
    Posted 1 year ago #

    I think there might be a string of code somewhere in my index.php file that these Category Plugins that I've tried installing are not able to overwrite or they are bumping heads.

    Any help would be greatly appreciated!

  8. jchambo
    Member
    Posted 1 year ago #

    OK so I found that if I add the following string, I can pick and choose what categories I want to show on the front page.

    'include' => '3,4,5,6',

    Added to:

    $cat_args = array(
      'include' => '3,4,5,6',
      'orderby' => 'name',
      'order' => 'ASC',
      'hierarchical' => true,
      'parent' => 0,
      'hide_empty' => 1,
      'child_of' => 0
    );

    However, if I want to take advantage of Category Plugins, is there something else I can add / remove to make this feature work for plugins such as "Ultimate Category Excluder" ?

Topic Closed

This topic has been closed to new replies.

About this Topic