Title: json21's Replies - page 4 | WordPress.org

---

# json21

  [  ](https://wordpress.org/support/users/json21/)

 *   [Profile](https://wordpress.org/support/users/json21/)
 *   [Topics Started](https://wordpress.org/support/users/json21/topics/)
 *   [Replies Created](https://wordpress.org/support/users/json21/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/json21/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/json21/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/json21/engagements/)
 *   [Favorites](https://wordpress.org/support/users/json21/favorites/)

 Search replies:

## Forum Replies Created

Viewing 11 replies - 46 through 56 (of 56 total)

[←](https://wordpress.org/support/users/json21/replies/page/3/?output_format=md)
[1](https://wordpress.org/support/users/json21/replies/?output_format=md) [2](https://wordpress.org/support/users/json21/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/json21/replies/page/3/?output_format=md)
4

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to build a custom query in Twenty Eleven](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/#post-3047795)
 * It works. Thanks again.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to build a custom query in Twenty Eleven](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/#post-3047793)
 * I created /images/headers folders in themes/twenty_eleven_sticky and uploaded
   all the files that belong to this folder from the parents theme (chessboard-thumbnail.
   jpg, chessboard.jpg, hanoi-thumbnail.jpg, hanoi.jpg etc…).
 * Then I added the code to functions.php (in the child theme), changed theme to
   Parent Twenty Eleven, uploaded a header image, and then switched to Twenty_Eleven_Sticky
   and the image doesnt show…
 * I would like to be able to simply inherit the current header image from the Parents
   theme to the child theme (after switching to Twenty_Eleven_Sticky). Now it just
   goes back to default images…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to build a custom query in Twenty Eleven](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/#post-3047791)
 * Yes. It works. I used a child theme. It is for a network of about 200 blogs, 
   and the only thing I would need to change is to keep the header image from the
   parent blog in the child theme also. Right now it switches back to the default(
   tree, chess board, cone etc).
 * I know I can re-upload it, but it would be easier to get around this one in the
   code.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to make child theme use parent theme's header image?](https://wordpress.org/support/topic/how-to-make-child-theme-use-parent-themes-header-image/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-to-make-child-theme-use-parent-themes-header-image/#post-3068111)
 * I have style.css, index.php, and functions.php in child theme folder. This is
   a Multisite subdomain installation. After changing the theme to child theme Twenty
   Eleven 1.4 goes back to the default image (one of these with cones, trees, chess
   board etc)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to build a custom query in Twenty Eleven](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/#post-3047786)
 * Thank you.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to build a custom query in Twenty Eleven](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/#post-3047764)
 * This is from wp-includes/query.php
 *     ```
       // Put sticky posts at the top of the posts array
         $sticky_posts = get_option('sticky_posts');
         if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) {
          $num_posts = count($this->posts);
          $sticky_offset = 0;
          // Loop over posts and relocate stickies to the front.
          for ( $i = 0; $i < $num_posts; $i++ ) {
           if ( in_array($this->posts[$i]->ID, $sticky_posts) ) {
            $sticky_post = $this->posts[$i];
            // Remove sticky from current position
            array_splice($this->posts, $i, 1);
            // Move to front, after other stickies
            array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
            // Increment the sticky offset. The next sticky will be placed at this offset.
            $sticky_offset++;
            // Remove post from sticky posts array
            $offset = array_search($sticky_post->ID, $sticky_posts);
            unset( $sticky_posts[$offset] );
           }
          }
       ```
   
 * Does it sound like a good idea to modify this one?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to build a custom query in Twenty Eleven](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/#post-3047714)
 * Thanks. What would I be looking at if I would like to have 10 posts per page (
   1, 2, 3 etc) and 9 + 1 (sticky) on the main?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to build a custom query in Twenty Eleven](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/how-to-build-a-custom-query-in-twenty-eleven/#post-3047637)
 * I dont have a static page. I think that index.php directs to content.php
 *     ```
       <?php /* Start the Loop */ ?>
       <?php while ( have_posts() ) : the_post(); ?>
       <?php get_template_part( 'content', get_post_format() ); ?>
       <?php endwhile; ?>
       ```
   
 * content.php looks like this:
 * [http://pastebin.com/dDNiyH5J](http://pastebin.com/dDNiyH5J)
 * There is an is_sticky() function on the top. I was trying to make some changes
   there but I was not able to get to the point where sticky displays on the bottom.
 * I think I would need to look at thinks like “Using the WP_Query Object”, “Building
   a custom query”, “Using query_posts()”, “Uisng get_posts()” etc.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display sticky on the bottom instead of the top of the page?](https://wordpress.org/support/topic/how-to-display-sticky-on-the-bottom-instead-of-the-top-of-the-page/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/how-to-display-sticky-on-the-bottom-instead-of-the-top-of-the-page/#post-3038301)
 * Thanks. I’ve seen this post on the same subject:
 * [http://wordpress.org/support/topic/how-to-put-sticky-posts-to-the-bottom-of-the-page?replies=2](http://wordpress.org/support/topic/how-to-put-sticky-posts-to-the-bottom-of-the-page?replies=2)
 * Where is the code that makes sticky appear on the top of the main page? (I know
   about the code in content.php, and wp-includes/post.php).
 * Is there any way to make a modification somewhere / somehow? I tried several 
   plugins, but none of them seem to work with Twenty Eleven 1.4 (but modifying 
   the code would be a lot better)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display Sticky Post on the bottom of the first page instead of the top](https://wordpress.org/support/topic/how-to-display-sticky-post-on-the-bottom-of-the-first-page-instead-of-the-top/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/how-to-display-sticky-post-on-the-bottom-of-the-first-page-instead-of-the-top/#post-3036939)
 * I changed the code, and even though the sticky post code is on the bottom, it
   is still showing on the top. Does anybody know what makes sticky posts display
   on the top, and let’s say not on the bottom of the bage (or in the middle of 
   page 3 etc)?
 * Thank you.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to display Sticky Post on the bottom of the first page instead of the top](https://wordpress.org/support/topic/how-to-display-sticky-post-on-the-bottom-of-the-first-page-instead-of-the-top/)
 *  Thread Starter [json21](https://wordpress.org/support/users/json21/)
 * (@json21)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/how-to-display-sticky-post-on-the-bottom-of-the-first-page-instead-of-the-top/#post-3036900)
 * I am not sure, but maybe this is the right direction. Does anybody have an idea
   why id doesn’t work (it doesnt show any posts at all)?
 * [http://pastebin.com/aEcEN5UG](http://pastebin.com/aEcEN5UG)

Viewing 11 replies - 46 through 56 (of 56 total)

[←](https://wordpress.org/support/users/json21/replies/page/3/?output_format=md)
[1](https://wordpress.org/support/users/json21/replies/?output_format=md) [2](https://wordpress.org/support/users/json21/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/json21/replies/page/3/?output_format=md)
4