SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot bazzablue's Avatar
    Join Date
    Mar 2005
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress - 2 loops, 2 categories - can I do this?

    Here's what I would like to do:

    On the left hand side of my home page to have a list of my 5 latest posts that would have the category of Blog and in the centre to have a list of my 3 latest posts with the category of Portfolio. Both sections would be styled differently and would take visitors to two separate sections of the site - Blog and Porfolio - which would look very different from one another.

    Another thing to bear in mind is that I don't want my home page to be index.php. I want two index.php pages - one for Blog and one for Portfolio.

    I have had a look around the web for this but most of the searches that show for multi loops seem to deal with having a featured post displaying different from the posts below.

    Is what I am wanting to do possible? I am fairly new to Wordpress and my knowledge of PHP is very, very limited.

    Thanks for any help.
    Barry

    Snap Designs
    Creating good impressions online and in print

  2. #2
    SitePoint Zealot bazzablue's Avatar
    Join Date
    Mar 2005
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update: Have managed to get two loops on the home page of a (very badly designed) test site - www.bazzasblog.co.uk and entries linking to different styles of post pages. I have also excluded posts with a category of Portfolio showing up on the Blog index page.

    The only thing left is to get the posts with a category of Portfolio to show up on the Portfolio page.

    Can anyone provide amy guidance for this?

    Thanks in advance for you help.
    Barry

    Snap Designs
    Creating good impressions online and in print

  3. #3
    SitePoint Zealot bazzablue's Avatar
    Join Date
    Mar 2005
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok all sorted.

    Simply saved index.php as index2.php. Gave it a template heading and set it to only include posts with the category of Portfolio on the page. In the admin panel selected the appropriate template for the Portfolio. And it worked - much to my surprise!
    Barry

    Snap Designs
    Creating good impressions online and in print


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •