I've spent quite a bit of time trying to get this archives page to just display the most recent post. However, in my attempts (which have only included changing two lines), I've managed to display the sidebar content from the most recent Portfolio item, plus the title of the most recent archive item.
How can I adjust the archives.php page (well, the child theme one I've created), to only get the most recent post as opposed to running the "while(have_posts())" statement.
Hi Tahir,
I created a custom post type called "Market Reports" and am displaying the page by linking it to the archives page, which can be seen here: http://www1.susanbandler.com/?post_type=marketrepo...
I've spent quite a bit of time trying to get this archives page to just display the most recent post. However, in my attempts (which have only included changing two lines), I've managed to display the sidebar content from the most recent Portfolio item, plus the title of the most recent archive item.
How can I adjust the archives.php page (well, the child theme one I've created), to only get the most recent post as opposed to running the "while(have_posts())" statement.
Thanks,
Kara
Hey!
Please see: http://codex.wordpress.org/Function_Reference/wp_g... .
Thanks
ThemeNectar Support Team
Hey! Change that code to this: