Forums

[resolved] Query posts and custom fields (7 posts)

  1. steverydz
    Member
    Posted 1 month ago #

    I am trying to display 4 posts from a particular category at the top of my homepage and the 5 lasted posts from all other categories in a different section of my homepage. A little bit like this:

    http://www.elliotjaystocks.com

    The category along the top is inserted with a custom field called 'Thumbnail'. I would like 4 of these to appear across the top of the page.

    I then want a regular style blog at the bottom of the page showing the latest posts but excluding the portfolio thumbnails.

    I have looked everywhere and cannot find a solution.

  2. pboosten
    Member
    Posted 1 month ago #

    How do you know these thumbnails are inserted through Custom Fields?

    Custom fields are part of a post/page, why not create 4 thumbnails in your xhtml?

    Peter

  3. steverydz
    Member
    Posted 1 month ago #

    I've seen a screen cast where he explains thats how he inserts them. I can insert them in manually however I need them to be dynamic as I update my portfolio.

  4. pboosten
    Member
    Posted 1 month ago #

    ah, oke. What exactly is the problem you're facing?

    Peter

  5. steverydz
    Member
    Posted 1 month ago #

    I can't seem to separate the loops basically. Obviously I'm going about this the wrong way.

    I used the query post tag with showposts=4 for the images and for the blog I want to use a regular loop to display the last 5 posts excluding the portfolio.

    My problem is that both loops are reading the showposts from both sections and therefore I can't keep the right number of posts in each section.

  6. pboosten
    Member
    Posted 1 month ago #

    Did you read this?

    Peter

  7. steverydz
    Member
    Posted 1 month ago #

    No I haven't seen that. Thank you, hopefully it will help.

Reply

You must log in to post.

About this Topic