• Several plugins use the new common wordpress thumnail.
    ( like wpbook that help me to generate facebook fan page for this blog)

    YAPB use this own attachment system.
    I’m not an expert, so my question is to understand is that will be possible to create a plugin or to add a function that test the existence of an existing thumbnail in the post

    Something like testing with has_post_thumbnail()
    and to use the wp_insert_attachment() function ?

    The goal will be to take advantage of existing functions and plugins around common wordpress thumnails

    thanks for your feedbacks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thanks , but that don’t help me a lot about the better strategy to use …

    Hi Ljvd

    Not sure if you solved it, but this is what i did, spent way to long on it today, you just have to be sure you have set a featured image on each post or page if you want the image to display

    This is the contents of my yafpp.php
    note that i have change the list to divs, you may want to change that back

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Hi Nigel,

    I’ve just find your answer today.
    Your code have been removed by a moderator :-/

    Should you share your file yafpp.php on pastebin like suggested by a moderator, for the advantage of the community.
    Or by email to linkedin[AT]ljvd(dot)com

    Thanks,
    Laurent (who now subscribe to the thread)

    Ok the site I did that for didn’t go ahead, I think this is the code, if not let me know and I will see if I can find a backup version of the code somewhere.

    https://pastebin.com/y3wvmMBe

    Note this was adapted for my project it may not work for you, BUT you must set a featured image for each post

    Plugin Author jaroat

    (@jaroat)

    Hi Laurent –

    If i find adequate wordpress hooks i could try to deliver an YAPB-Thumbnail via has_post_thumbnail(), the_post_thumbnail() and get_post_thumbnail().

    An general goal for the future is to replace the custom table and to save YAPB-Images as normal WP-Images or custom post types. That would additionally allow to add more than one image – but that’s really future talk.

    I’ll have a look what if anything can be done for you with the post_thumbnail-functions.

    br from Salzburg,

    – Johannes

    Thread Starter Laurent J.V. Dubois

    (@ljvd)

    Thanks for this feedback Johannes.
    I’ve shortly badly hooked the wpbook plugin for my need.
    So don’t lost your time to research a solution for me.

    This announced future of YAPB is a pretty good news,
    I’m pretty busy currently, but will be happy to translate the next version, my french is better than my english ??

    Plugin Author jaroat

    (@jaroat)

    Hi Laurent –

    Sorry, but i’ve bad news: i don’t find a way to hook cleanly into the get_post_thumbnail_id() function – And the base themes ‘twentyten’ and ‘twentyeleven’ both rely on this function.

    So this feature will really have to wait until i implement the WordPress-compatible saving of YAPB-images in the posts-table.

    br from Salzburg,

    – johannes

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to use common wordpress thumnail ? the_post_thumbnail’ is closed to new replies.