Problems with sticky posts

Viewing 9 posts - 1 through 9 (of 9 total)
  • #5113
    depatitasalacalle
    Participant

    Hi

    I have a problem. When i edit an old post to make it sticky, it also comes to the front page again. How can i avoid that? I just want the post to stay in it’s place and be sticky too.

    Thanks.

    Paula

    #5136
    Daniel Tara
    Keymaster

    The theme is specifically programmed to avoid this case. Make sure you have the latest version of WP and that a plugin is not interfering.

    #5176
    depatitasalacalle
    Participant

    How can i check it?

    #5188
    Daniel Tara
    Keymaster

    If you don’t receive an update notification in admin then you’re using the latest version of WP. Try disabling the plugins one at a time, if after disabling one the problem suddenly disappears then it was conflicting somehow. Make sure you have this code in functions.php:

    if ( ! function_exists( 'esplanade_ignore_sticky_posts' ) ) :
    /**
     * Ignore sticky posts from the main query
     *
     * Sticky posts are displayed as featured posts
     * in the slider on the front page if option
     * is activated in theme options.
     *
     * @since Esplanade 1.0
     */
    function esplanade_ignore_sticky_posts( $query ) {
    	global $wp_the_query;
    	if( ( $wp_the_query === $query ) && $query->is_home() && esplanade_get_option( 'slider' ) )
    		$query->set( 'ignore_sticky_posts', 1 );
    }
    endif;
    
    add_action( 'pre_get_posts', 'esplanade_ignore_sticky_posts' );
    
    #5200
    depatitasalacalle
    Participant

    I re-installed the last wordpress version and deactivate all the plugins, but it still happening

    #5201
    Daniel Tara
    Keymaster

    Are you using the latest version of WordPress? Did you double-check to see you have the code above infunctions.php? You can check the theme’s demo and see that what you are saying is not happening.

    #6383
    hombrepac
    Participant

    Hi Daniel.
    I was about to post regarding this issue, but got to search the forum first, just in case someone had the problem. If you think I should open another thread, just tell me. I will post here just in case, even though this post was several months ago.

    I’m using the latest WP release (3.4.1), I have the function you name above in functions.php
    I have disabled every plugin (even though I dont have weird or many).

    You can check the problem here: http://www.desktopwatch.org

    I would very much appreciate if you could help me there. Thanks in advance.

    #6413
    Stefan
    Participant

    I have the same problem on my side. I’am using also the newest WorPress Version and template version.

    #6469
    Daniel Tara
    Keymaster

    If the post you assign to the slider is the latest post, then it will also display in the blog because the blog displays posts in reverse chronological order.

Viewing 9 posts - 1 through 9 (of 9 total)

Tagged: , , , ,

You must be logged in to reply to this topic.