WordPress.org

Ready to get started?Download WordPress

Forums

Display featured images from pages and display on another page (2 posts)

  1. lsterling03
    Member
    Posted 2 years ago #

    Hello.

    I would like to create a template that pulls in all the featured images from PAGES (not posts) that are marked with a certain "category." I know you can't apply categories to a page, so is there something I can do with custom fields to simulate the same effect?

    For example, let's say I have a page called Cats. Then I have several other (child) pages called Tabby Cats, Calico Cats and Siamese Cats - and each has a featured image.

    On the main Cats page, I would like to pull in all the featured images from the Tabby, Calico and Siamese PAGES (not posts). I assume they would have a custom field that somehow designates them with a "Cats" label. The resulting page of featured-images would link to their corresponding pages.

    It's a long story, but I can't make them posts. They have to be pages. Is there any way to do this??

    Thank you!

  2. lsterling03
    Member
    Posted 2 years ago #

    Update - I have found a way to add categories to a page. (I registered the category taxonomy for pages in my functions.php.) So I can now categorize a page as "Calico Cats" and set a featured image.

    The problem remains... How do I pull all the featured images from the "Calico Cats" category into a page? Etc.

    I appreciate any help. Thank you!

    p.s. I'm not actually making a website about cats. :)

    [ Please do not bump, it's not permitted here. ]

Topic Closed

This topic has been closed to new replies.

About this Topic