Forums

Need a little PHP help for thumbnails (2 posts)

  1. thetanooki
    Member
    Posted 5 months ago #

    So I'm using a Beta version of a plugin that hasn't yet been submitted to WordPress... and because it's a Beta from several months ago, it doesn't quite work cleanly with WP 2.8.4.

    For the most part, I've managed to get WP Post Thumbnail 0.2 Beta 2 working, but the code for inserting it manually into theme doesn't work with 2.8.4. Instead, it tries to automatically insert itself at the beginning of the_content(). Initially I edited the code so it would insert itself with the_excerpt() (since I use excerpts), but since that doesn't line up with my byline, I changed it to the_category().

    Unfortunately, this messes with the category selection area in the backend once a post has been saved into the system - it tries to show the thumbnails. I'm not great with PHP. Anyone know how I can create a separate function (like the_thumb() maybe?) in functions.php or wherever, and then I can just call that and have the plugin insert the thumbs there?

    Thanks in advance.

  2. esmi
    Moderator
    Posted 5 months ago #

    Might a shortcode be the best approach?

    http://codex.wordpress.org/Shortcode_API

Reply

You must log in to post.

About this Topic