• Hi… I’ve done some searching here, and haven’t yet found an answer to my question.

    A friend showed me how to display individual categories in a page other than the WP index, by putting the category number at the top of your document.

    I am now trying to figure out how to display only the newest post on a page other than the WP index. Just the newest post, whatever it is.

    How is this done?

    thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • WP shows the newest posts by default. You can change the number of new posts to be shown from Options>Reading.

    Suppose you want to show the new posts in a page called new.php, then copy everything you have in index.php and put it in new.php and it should work if you have the ‘messy’ URL’s. In case of the clean URL’s, you have to edit your .htaccess.

    Take a look at the WP function get_posts():

    https://wiki.www.ads-software.com/get_posts

    I think I have the same problem… my first blog entry shows and my second blog entry kind of shows a little bit of itself but it goes over the top of my previous one which still displays.. this wp stuff is a rigmarole to configure.

    Actually jazzy, the issue here is one of how to accomplish a specific task (display only the most recent post on a page), and is not (necessarily) a problem.

    Still very technical to configure.. the smallest thing makes the biggest difference…

    When you want to force a program to do what you want instead of what it normally does, it tends to lean that way, even for the little things… :)

    Hehe. :p

    Mine is still toppling over the other one. Is it my div layer doing that?.

    Better yet, https://dont-complain.org/jazzy is my site, the way that blog is on it is the way I would like my wp one… my wp is https://www.dont-complain.org/jazzy/wp/index.php you can see how I have it kind of like it, but its not working, (errors in code, etc) so can someone write me a main template code so that it looks like that?. Same width, font color, font style, same hover link color, etc and put it on here for me to paste into my main template… because I am stuck like nothing else. I’ll give credit to whoever can do it.

    LOL, anyone gonna help?.

    Thread Starter davidcorrell

    (@davidcorrell)

    well, I answered my own question. After fighting with the get_recent_posts plug-in for a long time, I discovered get_posts which did exactaly what I wanted.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Display only newest post’ is closed to new replies.