• I’m trying to get all of my recent posts on the main index to post on top (older on bottom) Here’s the thing…I got it to work, but the recent post today is posting on the bottom again.

    This is what I put:

    <?php query_posts(‘showposts=5&order=DESC’); ?>

    Is that correct, should I put something different?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Try using:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'showposts' => 5,
    	'paged' => $paged
    );
    query_posts($args);
    ?>
    Thread Starter rmo120

    (@rmo120)

    Thanks…it seemed to work, although that same post is still on the bottom. I tried a test post and it posted on top, although now there’s another issue that has come up before…

    The posts start to smash into each other and look unorganized. Do you know how I can fix this?

    Thread Starter rmo120

    (@rmo120)

    You have some validation errors – including some missing closing </div> tags that need fixing.

    Thread Starter rmo120

    (@rmo120)

    Is this supposed to be on the index.php for the theme? Nothing seems to match up and there’s no lines up to 939. Where do I find these?

    Is this supposed to be on the index.php for the theme?

    Yes

    Where do I find these?

    On the validation page, tick “Show Source” then Revalidate. as well as the errors, the validator will output a line-numbered copy of the source code that you can use to identify the problem markup.

    Thread Starter rmo120

    (@rmo120)

    My file of the index.php looks nothing like what’s on the validation page.

    The file I’m looking for should be under the current theme folder, right?

    The validation shows the page output (displayed page). On the front page, it’s normally comprised of header.php, index.php, sidebar.php and footer.php. So you need to start working backwards to identify what errors are in which files.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Recent posts on top…was working, but not for new post’ is closed to new replies.