How to avoid duplicate sticky post in home page?

Viewing 2 posts - 1 through 2 (of 2 total)
  • #4923

    Thank for excelent theme!
    The same sticky post shown in the slider and in home page when it is the last. How to prevent this? Need to change wp-php codex?

    Daniel Tara

    The intention of the slider is to bring older content to the front page. Excluding individual posts from the loop is a process I don’t personally recommend, you can simply mark it sticky after it’s pushed away from the home page.

    However if you wish to exclude them, you can go to functions.php, function esplanade_ignore_sticky_posts and replace the line

    $query->set( 'ignore_sticky_posts', 1 );


    $query->set( 'post__not_in', get_option( 'sticky_posts' ) );
Viewing 2 posts - 1 through 2 (of 2 total)


You must be logged in to reply to this topic.