• Hi there,

    Here is what I want to do:

    Create a separate page to feature all posts that are in a specific category. I have done this before by simply using my archive pages.

    However, on this custom page I want to display my posts differently. i.e. in a more classic blog format as apposed to the portfolio style I have on the other pages.

    Is this possible?

    Thanks for all your help. I understand this is a little tricky…

Viewing 15 replies - 1 through 15 (of 20 total)
  • create a page template and add whatever code you need:

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

    Thread Starter homelessmindtheory

    (@homelessmindtheory)

    Hi,

    Thanks for getting back to me.

    I don’t think I explained myself very well. I understand I must edit a page template. I just don’t know what to include.

    If I paste the loop from my index.php I will get the same format. But I want my posts in a different format. So what do I need to edit to change the format? Do i get a loop from another theme and use that?

    Thanks thanks thanks!

    So what do I need to edit to change the format?

    edit the code within the loop – only you know what you want to output in what layout and how formatted;

    use whatever html and css and php codes you need.

    without a precise description of what you want to achieve, nobody will be able to help you.

    Thread Starter homelessmindtheory

    (@homelessmindtheory)

    Ok,

    I want my posts displayed in a simple one column format. For example see the front page of this blog: http://nofearofpop.net/

    So would I literally just copy the loop from the index.php of this site and paste it into my custom page?

    So would I literally just copy the loop from the index.php of this site and paste it into my custom page?

    impossible to say without knowing what theme you are using.
    most likely this will cause problems as different themes are using different html structures.

    can you post a link to your site?

    Thread Starter homelessmindtheory

    (@homelessmindtheory)

    ye sure. http://homelessminds.com/

    thanks for your help…

    possibly try to use page.php as a starting point for your category page template.

    Thread Starter homelessmindtheory

    (@homelessmindtheory)

    I’m sorry, but having tried for hours, I cant even manage to get a page of posts with the same format.

    Nothing is working, so unless you can provide me with some more in depth help as to how to go about it then I think I will give up. there is very little help for this about trust me I have looked.

    Thanks anyway.

    caveat:
    the page-of-posts example in the Codex is written for the old ‘kubrick’ default theme, and will generally not work with any other theme.
    you need to replicate the html structure of your own theme.

    btw: what happens if you use page.php of your theme as the basis for the page template?

    On a related note, I think that PageofPost example is rather complex and obscure. Would a simple PageOfPosts template based on Twenty Eleven that just pulls posts from 2 categories be a useful addition? I’ve written one for my downloadable 2011 child theme and could easily add it to the Codex.

    Thread Starter homelessmindtheory

    (@homelessmindtheory)

    alchymyth: If I use Page.php theme for the basis of my page template It fails to retrive the posts, and instead, features the page as a post itself.

    Esmi:a simple PageOfPosts template based on Twenty Eleven that just pulls posts from 2 categories i think would be perfect…

    Thread Starter homelessmindtheory

    (@homelessmindtheory)

    alchymyth: p.s. for an example of how my page looks, using my page.php as a basis check here…

    http://homelessminds.com/?page_id=3051&preview=true

    For now, see http://pastebin.com/2p194wfn

    I’ll bring this up on the wp-docs mailing list and see if I can get an OK to include it on the Codex page.

    Thread Starter homelessmindtheory

    (@homelessmindtheory)

    esmi, how do i “replicate the html structure of my own theme”?

    ….

Viewing 15 replies - 1 through 15 (of 20 total)

The topic ‘Custom Page Loop’ is closed to new replies.