Title: jay_wp's Replies | WordPress.org

---

# jay_wp

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

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

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling posts differently](https://wordpress.org/support/topic/styling-posts-differently-1/)
 *  Thread Starter [jay_wp](https://wordpress.org/support/users/jay_wp/)
 * (@jay_wp)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/styling-posts-differently-1/#post-5687987)
 * It’s incredible to see how powerful CSS can be! I tried :first-child and :nth-
   child selectors (selecting .post then the article element as an alternative),
   and it seems to be working like a charm! Not sure if this method might cause 
   any problems down the road (other than the older browsers issue) but I think 
   I will go with this option. Thank you all for your guidance.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling posts differently](https://wordpress.org/support/topic/styling-posts-differently-1/)
 *  Thread Starter [jay_wp](https://wordpress.org/support/users/jay_wp/)
 * (@jay_wp)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/styling-posts-differently-1/#post-5687978)
 * [@trisham](https://wordpress.org/support/users/trisham/), thanks for your response.
   CSS :first-child selector may work for the first post but how about the three
   or four posts following that first one? They are all on the home/front page but
   the very first (most recent) post and the other group of three or four will have
   different styles.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling posts differently](https://wordpress.org/support/topic/styling-posts-differently-1/)
 *  Thread Starter [jay_wp](https://wordpress.org/support/users/jay_wp/)
 * (@jay_wp)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/styling-posts-differently-1/#post-5687969)
 * Following from my post above, I guess I should also ask why the CSS approach 
   would not be possible. I’m guessing it’s related to the dynamic nature of the
   platform and not being able to select the latest post (and few earlier ones) 
   through HTML structure of the theme.
 * As per your advice, I changed my index.php page as below. Does it look ok? Thanks
   a lot again for your help.
 *     ```
       <div id="primary" class="content-area">
       		<div id="content" class="site-content" role="main">
       		<?php if ( have_posts() ) {
       			 while ( have_posts() ) {
       			    the_post();
       			    if( $wp_query->current_post == 0 ){
       			        get_template_part( 'content', 'style1' ); //loading content-style1.php file
       			    }
       				elseif( $wp_query->current_post > 0 && $wp_query->current_post < 4 ){
       			        get_template_part( 'content', 'style2' ); //loading content-style2.php file
       			    }
       				else{
       			        get_template_part( 'content', get_post_format() );
       			    }
       			    $wp_query->current_post++;
       			    }
       			    twentythirteen_paging_nav();
       				}
       				else{
       			    get_template_part( 'content', 'none' );
       				}
   
       		</div><!-- #content -->
       	</div><!-- #primary -->
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling posts differently](https://wordpress.org/support/topic/styling-posts-differently-1/)
 *  Thread Starter [jay_wp](https://wordpress.org/support/users/jay_wp/)
 * (@jay_wp)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/styling-posts-differently-1/#post-5687966)
 * Hi again, while I try to implement the solutions suggested, I’ve wondered why
   this cannot be done simply with CSS. Not sure if and how this is possible but
   I’m just wondering if there is a way to select the first post and the next three(
   or four) posts on the home/front page and style them on the style.css. Is this
   possible? What do you think? Thanks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling posts differently](https://wordpress.org/support/topic/styling-posts-differently-1/)
 *  Thread Starter [jay_wp](https://wordpress.org/support/users/jay_wp/)
 * (@jay_wp)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/styling-posts-differently-1/#post-5687884)
 * [@ghanshyam](https://wordpress.org/support/users/ghanshyam/), thanks for your
   clear response. I will give it a try later today.
 * [@wp](https://wordpress.org/support/users/wp/) Gurus, thanks for the short cut.
   I can try it especially for learning purposes but I couldn’t get my head around
   how I can check the value of $wp_query->current_post in Ghanshyam’s code? Where
   exactly in his code should I place that?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Thank You page](https://wordpress.org/support/topic/thank-you-page-14/)
 *  Thread Starter [jay_wp](https://wordpress.org/support/users/jay_wp/)
 * (@jay_wp)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/thank-you-page-14/#post-5652330)
 * Huh, thanks suziwilson. I just created a custom menu which seems to be the perfect
   and simple solution to a problem that created long threads of posts in the forum.
   I wonder why no one offered this method before.

Viewing 6 replies - 1 through 6 (of 6 total)