Home Forums Themes Support Gecko How to hide a category from Blog

Topic Resolution: Resolved
Viewing 6 reply threads
  • Author
    Posts
    • #13252

      I need to hide “featured’ category posts from the blog. (I need them to show up only on a dedicated plugin I installed)

      How can I do that?

      the blog is under http://www.kaeciconcept.com/blog

      and the page where we want the ‘featured’ category posts is

      Press Kit

       

      Tks very much!

      Ana

       

    • #13286

      Hi,

      Sorry we don’t know how to use the plugin you used. You can ask plugin plugin author they better than us for this case.

      You can change menu “name” of page you want to featured blog to “Blog” and hide current “Blog” menu.

      and go to Settings > Reading > Change to select to hide default blog layout http://prntscr.com/hapuk1

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #13290

      tks very much Harry! Actually I found a solution that worked .  i’ll share here in case others may want the same.

      You can edit the functions.php file :

      Add this code to the very end of the file before closing php tag ?> and replace 6 with the category ID (that you want to omit from blog):

      function exclude_category( $query ) {
      if ( $query->is_home() && $query->is_main_query() ) {
      $query->set( ‘cat’, ‘-6’ );
      }
      }
      add_action( ‘pre_get_posts’, ‘exclude_category’ );

      Thank you

      Ana

    • #13294

      Hi Ana,

      This mean you want exclude a category from your blog page?

      We recommend put your customize code in functions.php in gecko-child to keep your code when update parent theme.

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #13298

      Harry, I m so unfamiliar with working with the child theme but I know it’s what i shou;d do yes. For now it works so I’ll do it  in a few days.

      I do still really need help with

      • language menu on mobile (it’s not dropping down – Now its’s not even there)
      • and eliminating ‘clients’ for portfolio categories.

      I appreciate all the hel you can give me with those 2 items…

    • #13347

      Hi Ana,

      2 others issues our team member help you solved in another topic. Please reply on correct topic for us easy to track.

      Thanks

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #13348

      Will do. Thank you very much for all the support so far.

Viewing 6 reply threads

You must be logged in to reply to this topic.