WordPress.org

Ready to get started?Download WordPress

Forums

Select page of pagination on frontpage by date (3 posts)

  1. clampino
    Member
    Posted 6 months ago #

    Here's my problem:

    I have a historical diary, which was written a few years ago. All diary-entries should be posts in a wordpress-site. When entering the wordpress-site, the frontpage should show the entry/post (quite easy so far), which was written exactly one year ago, but there should still be the possibility to skip to newer and older posts with the pagination. (which is the big problem).

    To make it more clear, here's an example: The blog has 50 posts divided on 25 subpages to skip through. The post, which was written exactly on year ago can be found on page 3 of 25. When entering the website, page 3 of 25 should be on the frontpage, but still with the possibility to skip to sites with older or newer entries. here's a screenshot, how the frontpage could look like.
    http://schaurestaurierung.belvedere.at/screenshot-selected-post.png

    Has anyone an idea how to solve this? Thank you very much!

  2. Chris Hardie
    Member
    Posted 6 months ago #

    Hi. I think you can do what you want by creating a custom PHP template file that selects the post you want in the way it queries the posts:

    http://codex.wordpress.org/Template_Tags/query_posts#Retrieve_a_Particular_Post

    Then, you could create a page on your site that uses that template file as its template:

    http://codex.wordpress.org/Page_Templates#Selecting_a_Page_Template

    and then specify that page as your front page in the Settings -> Reading admin panel:

    http://codex.wordpress.org/Creating_a_Static_Front_Page

    I hope this helps.

  3. clampino
    Member
    Posted 6 months ago #

    Thank you very much for your help, chris!

    Unfortunally it doesnt't work or is not exactly what I need. I still don't have the possibility to skip to newer or older posts, because just one post is queried.

    I think it would need a way to query all posts, than select one post and skip automatically to the page, where the post is. Or maybe one could create custom buttons for the next and previous posts or pages. Does anybody know, how could this be done?

Reply

You must log in to post.

About this Topic