• Thanks to one of the moderators of this forum, I am using a custom code, which displays a sticky post on the bottom, instead of on the top of the page. I was able to apply it to twenty other themes, but I am not sure why I cant get it to work with “Responsive”

    In order for this theme to display posts on the main page, instead of a static front page, a WordPress page needs to be added, and posted as a template -> Blog. For this reason I’ve done the modifications in blog.php (I tested it and that’s where the posts are coming from in the child theme, I can delete almost everything from index.php, and the posts will still show up, when I delete blog.php, from child and parent themes, the posts don’t work).

    This is the blog.php file:
    http://pastebin.com/XEZC5XnN

    And functions.php that I am using in the child theme:
    http://pastebin.com/2sUsjnDr

    The code seem to be working fine, but I am showing a sticky post on the top and on the bottom of the main page, and I am not sure where is it coming from (the one on the top).

    If possible, please let me know what might be going on.

    Thank you.

    Original topic here:
    http://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven?replies=16

Viewing 1 replies (of 1 total)
  • Thread Starter json21

    (@json21)

    It looks like this part of the code from blog.php might be causing the issues:

    <?php
        if ( get_query_var('paged') )
    	    $paged = get_query_var('paged');
    	elseif ( get_query_var('page') )
    	    $paged = get_query_var('page');
    	else
    		$paged = 1;
    		query_posts("post_type=post&paged=$paged");
    ?>

    There is similar code in functions.php file that I included in the previous post, and it might be conflicting with this one. Removing the code from any of the files does not help…

Viewing 1 replies (of 1 total)
  • The topic ‘[Sticky on the bottom custom code] Sticky displays twice, on top and bottom’ is closed to new replies.