Exclude Category from front page but not form slider

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

Status: resolved
Viewing 2 reply threads
  • Author
    Posts
    • #10481

      Dear Sir,

      I want slider same as your so i had inserted image in post its working fine in slider but i dont want to be shown on front page as a post so i try to exclude slider category for front page with the below code but when i do this it goes from slider also please i got below code from one webiste i had posted that reference link i want to show image on slider but dont want to post on front page

      note i am using only category for slider.

      Reference link : – http://www.locoed.com/web-design/how-to-exclude-category-posts-wordpress-tutorial-code/

      function exclude_category($query) {
      if ( $query->is_home() ) {
      $query->set(‘cat’, ‘-xx’);
      }
      return $query;
      }
      add_filter(‘pre_get_posts’, ‘exclude_category’);

      thanks

    • #10482

      https://wpthms.com/support/topic/posts-problem/#post-7583

      thanks my issue resolved through above link

    • #10483

      just removed
      add_filter( ‘yt_exclude_featured_post_ids’, ‘__return_false’ );

      form my custom_function.php

Viewing 2 reply threads
  • You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

© Copyright 2021 by wpthms.com. All Rights Reserved.