Group Admins

WordPress Troubleshooting and Support

Public Group active 1 year, 2 months ago ago

WordPress support from our community

want custom field image to show with post titles and excerpts on archive pages

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #1572

    along with every post on a certain site i manage, i have a Custom Field name=”portfolio-image” and Value=””

    i want these images from the custom fields to appear on my archive pages along with each post title and excerpt.

    in my twentyten child theme, this is the code from my category.php page: what do i put in there and where to make that happen? please advise. thanks in advance!


    @Jake— Use get_post_meta to pull and display custom fields.


    @Steve – how come not get_post_custom_values?

    i have this code elsewhere in the site:

    still, either way, how do i incorporate the code into the category.php code? php is not my forte 🙁

    on a related note, how do i paste code in here and get it to show? i tried the backticks, but no dice.


    get_post_custom_values is really for custom fields that contain an array. However, your example shows how you can use it by getting the first (and only instance) in the array: [0].

    Read the first two paragraphs of the codex.

    Have you tried your get_post_custom_values code in your category.php page? Seems like it would work.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.