Exclude Category from front page but not form slider

This topic is: Resolved

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

This topic contains 2 replies, has 1 voice, and was last updated by  bhadreshpunjabi 1 year, 5 months ago.

  • Author
    Posts
  • #10481

    bhadreshpunjabi
    Member
    Post count: 17

    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

    bhadreshpunjabi
    Member
    Post count: 17

    Posts Problem

    thanks my issue resolved through above link

  • #10483

    bhadreshpunjabi
    Member
    Post count: 17

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

    form my custom_function.php

You must be logged in to reply to this topic.

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