• Is there a way to display only the 2nd or 3rd most recent post? I’m designing a theme and want to make my posts display in a different manner then a typical single column (much like this site https://www.kineda.com/) My approach has been to try to separate my posts so I can position each one where I want it.

    Thanks for the help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Will they all be from the same category or will each column represent a different category?

    Thread Starter tyleroakleaf

    (@tyleroakleaf)

    The same.

    I’m not sure if I understand you 100%. It sounds like it’s just a css issue and not a programming issue. Is this correct? (The order that they’re posting in now is fine, you just want them to look different on the page?)

    Thread Starter tyleroakleaf

    (@tyleroakleaf)

    If you know of a css solution I’d love to hear it, but I want to call each post individually, and the only way I can think to do that is through php.

    I want to call each post individually

    What do you mean by this?
    Do you want the your posts updating in a loop or do you want to place individual posts that never change in a certain place on your webpage?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    If you just want to position them differently, but still want to have them cycle through, change your Loop to put each post in its own DIV. Then you can position them through whatever CSS you like.

    Example:

    <?php
    ...
    $my_post_counter=0;
    // beginning of the Loop
    while (have_posts()) {
    the_post();
    $my_post_counter++;
    ?>
    <div id="post-<?php echo $my_post_counter; ?>">
    <?php
    // stuff to display post goes here
    ?>
    </div>
    <?php
    } // end of the Loop
    ...
    ?>

    See? So each post gets put into a div with an id of “post-X” where X is the number of the post on the page. Then you can arrange them around with CSS.

    Thread Starter tyleroakleaf

    (@tyleroakleaf)

    That’s what I was looking for! Thanks!

    hi how would you arrange them with CSS taking the individual posts and resized them into the little “blocks” approximately 210px wide. But they show up within the “content” area of the home page in decending order from most recently posted

    4
    3
    2
    1

    like “tyleroakleaf” I would like to have it similar to the kineda site where its 2 posts per row in order of left to right.

    4 3
    2 1

    Any help would be greatful thank you.

    sorry meant to say that I have resized them into little 210px wide boxes but they show as normal decending vertically 4,3,2,1.. so how would I get them to

    4 3
    2 1.
    thanks

    Figured it out. Thanks used a used a gave the class “post” a fixed width and height and made it float:left; may not be the right way to get it done but its working.

    Figured it out. Thanks in the css resized the class/style “post” with a fixed width and height and made it float:left; may not be the right way to get it done but its working. posts come out as
    4 3
    2 1

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Query specific post by date or order posted’ is closed to new replies.