what is the code of your PageOfPosts.php template?
please paste the code into a http://pastebin.com/ and post the link to it here.
nb: there is no such a thing as a universal pageofposts template – if you got it from http://codex.wordpress.org/Pages#A_Page_of_Posts then this is only a very special, general example of how to do it.
note the use of custom fields in that example – you most likely don’t have them the exact same way.
Hi,
Thanks for your response. Here is the code, as requested:
http://pastebin.com/kmm4f9wZ
Any help is gratefully accepted.
Regards.
as i thought;
try: http://pastebin.com/83YjbhWT
if the dispaly is different from your other templates, you might need to change a few html tags.
if you want to change/adapt the query, see
http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
Hi… Firstly, thanks. The posts are displaying.
However, it has slightly broken the template. http://goo.gl/UQuwK
How do I fix it? The content area is taking up 100% of the page width. I am not a PHP or CSS expert.
as i said:
if the dispaly is different from your other templates, you might need to change a few html tags.
you copied a page template, which was based on the html structure of the kubrick theme (default theme before wp2.9) which has a different html structure than twenty ten.
any attempts to fix this will be more trouble than they are worth.
it will be easier, if you use index.php of your theme as the starting point of the page template;
can you paste the code of that index.php of your theme into a http://pastebin.com/ and post the link to it here?
Hi again,
Sorry, I missed the part about templates. I did not know that the wordpress example was based on Kubrick.
Ok, here is the index.php: http://pastebin.com/8vdQZy0Q
But it calls the loop-index.php: http://pastebin.com/G6nMDSSp
can i just make the page of posts template use the loop-index.php file?
can i just make the page of posts template use the loop-index.php file?
quite possible; however, there are some theme specific html tags before the loop which would need to be adapted as well.
this code:
http://pastebin.com/K0hSj4Ci
is basically:
– index.php with the neccessary code at the top to make it a page template;
– with the neccessary query;
– with the code from loop-index.php copied into it, and redundant parts removed (loop-index.php has three conditional sections which are not needed in a page-of-posts);
– wp_reset_query()
added just in case some functions in the sidebar and footer need to know which page they are on;
hopefully it works 😉
It worked! Thank-you a lot for your help!