Support » Fixing WordPress » Issues displaying post images with custom fields

Viewing 14 replies - 1 through 14 (of 14 total)
  • I think you need to take out the ‘echo’ in <?php echo get_post_meta(....

    If this solves your problem, please mark this topic ‘Resolved’.

    If you update to 2.9, and add a couple of lines to your theme, you can have post images without the need to use custom fields.

    2.9 adds post image support..

    There’s a good post about how to add the support to your theme here.
    http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature

    However, it looks like Justin’s site is down at the moment, so might need to check later(or use google’s cache).

    Disregard my post about removing the echo – didn’t engage brain before typing.

    If you don’t want to upgrade to 2.9, can you post a link to the site where your code is in use so we can see the output of the script?

    Thread Starter orbital2000

    (@orbital2000)

    t31os & vtxyzzy-

    Thanks for the advice. Upgrading to 2.9 wouldn’t be a problem, since my site is in development. One question about this: I’m using two divs: one for the post image, and one for the content output. With 2.9, can I specify post images to show up in the div I’ve specified for images?

    I’m running the site on my local server with XAMPP, so unfortunately I can’t provide links to my pages.

    Yes you can, you have to add the code into your template anyway, it doesn’t sit as part of the content, this is more a replacement for the custom field approach (or at least it seems that way to me)..

    Did you check out the write up above, on Justin’s site? It’s dead easy …

    Thread Starter orbital2000

    (@orbital2000)

    I just upgraded to 2.9 – so far so good.

    The link provided by t310s is still down. I’m searching for other relevant tutorials, so if anyone has a good one, let me know.

    I’d still like to know how to get my original code working, so I’d love for someone to have a look to see where I went wrong.

    Thanks…

    You can get the key information from the post using google’s cache..
    Click

    And some additional info:
    wpengineer.com/wordpress-2-9-add_theme_support-and-has_post_image/

    Alternative blog post:
    kremalicious.com/2009/12/wordpress-post-thumbnails/

    Thread Starter orbital2000

    (@orbital2000)

    resolved-

    i used the following tutorial: http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/

    1. add coding to functions.php to enable post image functionality
    2. add coding to the loop in your blog file
    3. specify “thumbnail” image at bottom right of new post admin page…there should be a link to “set thumbnail”
    4. make sure to click “as thumbnail” under “Image Size” —DO NOT select “insert in post”!
    5. save changes, update post and you’re done

    This is an awesome feature and literally took me 5 minutes to figure out and initialize the functionality.

    Thread Starter orbital2000

    (@orbital2000)

    For step #3 – I meant to write “use as thumbnail”…typo

    Good stuff mate… 🙂

    Hopefully this will cut down the amount of repeat custom field image questions.

    I also tagged this post with the single word tags, it should help anyone searching for information.

    Might want to mark the topic ‘Resolved’ so those looking for a solution will see that you found one.

    I don’t keep up on new features as much as I should obviously…this is very cool.

    You guys helped me implement this on my WP site, which is neat, but even cooler….I throw up excerpts of my post on my non-WP homepage, which was neat and all, but this is a really easy way to include images over there!

    Thread Starter orbital2000

    (@orbital2000)

    Sorry folks – RESOLVED

    Please mark the topic ‘Resolved’ in the right column dropdown. Thanks.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Issues displaying post images with custom fields’ is closed to new replies.