I am developing a blog in WordPress on my computer (currently not yet on the Internet – sorry) and I have incorporated the Archive Page structure of theme “Monotone” into another theme (“Neo_Sapien”).
I have done this by creating a Page called “picture-archive” which shows thumbnails of images belonging to posts in the most recent year. The page also has a couple of drop-down menus which allow you to select either thumbnails of images belonging to posts of a different year or thumbnails of images belonging to posts belonging to a particular category.
In addition to this, my revised theme also has traditional Category and Archive links in the sidebars which link to urls such as http://localhost/wordpress/category/animal/ or http://localhost/wordpress/2010/
When you are at my picture-archive page and select a category, WordPress redirects to a url such as http://localhost/wordpress/picture-archive/?cat=3 and the picture archive page reappears, this time just showing thumbnails from the chosen category. This works fine.
Having had a look at the query_posts function, I decided to make the year drop-down menu redirect to urls such as http://localhost/wordpress/picture-archive/?year=2010. This does not work at all. My url displays what looks like the 404 page with the message “Not Found
Sorry, but you are looking for something that isn’t here.” (Hard coding a query string such as $query_string=’year=2010′ in my page’s custom template php file works as expected.)
It now occurs to me there are constraints on what Query Strings can be used with the urls of Pages in WordPress which I do not know about. Can anyone suggest a way of passing a year argument to a Page? or some other work-around for this problem? I am also wondering what will happen when I try and implement the “Earlier Posts/Later Posts” links for selections with more posts than the posts_per_page= option.
Thanks in advance if you can help.
- The topic ‘How to pass a year query string to a Page?’ is closed to new replies.