Support » Themes and Templates » Just need some clarification on get_post_meta()

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi

    (@esmi)

    Forum Moderator

    Try <img src="<?php get_post_meta($post->ID, 'wppt_4x3', true); ?>"

    Thanks for the response. This is pretty much what I had, but I tried again with what you provided exactly. Same result, for some reason I just keep getting the alt text instead. Here’s what the source code says is outputting:

    <img src="" alt="thumbnail image" width="100" height="75" />

    esmi

    (@esmi)

    Forum Moderator

    Are you sure that the custom field wppt_4x3 stores the image url?

    Unless there’s something hidden that I don’t know about, then yeah – I’m looking at it right on the Edit Post screen.

    If it helps, here’s the plugin in question: http://www.seoadsensethemes.com/wordpress-wp-post-thumbnail-plugin/

    Towards the bottom of the actual info post, the author provides a code for theme developers to insert the thumb manually into themes. This code doesn’t work, and speculation is that something with the plugin isn’t compatible with 2.8.4. However, the plugin itself still works, as it will still automatically insert the thumb at the beginning of the_content (or the_excerpt, if you know where to make the edit). I tried it with the_excerpt, but part of the reason I’d rather insert it manually is because I don’t want the thumbs with all my excerpts (multiple loops).

    I asked if anyone knew a workaround for inclusion in themes, as seen at the bottom here: http://www.seoadsensethemes.com/0-2-beta-2-release/ I was given an example code, but it doesn’t work – it doesn’t call the image. But I noticed they used get_post_meta, which sure enough the URL for the thumbs is stored as a custom value when I checked. I’m just trying to get a working code out of it.

    Again, unless something else is hidden, there shouldn’t be much more to it. The key name is wppt_4x3, and the URL provided is indeed the thumb location. Am I missing something?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Just need some clarification on get_post_meta()’ is closed to new replies.