WordPress.org

Ready to get started?Download WordPress

Forums

Auto Post Thumbnail
[resolved] Not working if I am using the [gallery] shortcode (6 posts)

  1. Maraki
    Member
    Posted 1 year ago #

    It appears that the plugin is not working if I don't insert any images inside the post.

    I am using the [gallery] shortcode to display images.

    thanks
    Maraki

    http://wordpress.org/extend/plugins/auto-post-thumbnail/

  2. Amit Badkas
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Maraki,

    The shortcodes are converted at view time. So this plugin will not work with [gallery] shortcode

  3. Maraki
    Member
    Posted 1 year ago #

    Hello Amit,

    Thanks for the reply. Would you know a function that automatically sets the featured image based on the first image in the gallery?

    x

  4. AndyArthur
    Member
    Posted 1 year ago #

    There is a simple solution to this: wrap each reference to $post[0]->post_content in do_shortcode.

    e.g.

    do_shortcode($post[0]->post_content)

    While I'm a total WordPress Newbie, and don't know anything about WordPress, this works perfectly for me. It seems that not doing this is a bug -- but maybe the author has a reason for avoiding it -- like consistency with the API or preformance issues. - Andy

  5. Maraki
    Member
    Posted 1 year ago #

    Hello Andy,

    I am bit scared to change this as i have a lot of other plugins installed..

  6. tariquesani
    Member
    Plugin Author

    Posted 1 year ago #

    The PRO version of this plugin can resolve short codes - see demo at http://sanisoft-demo.com/plugins/ it is just $5 and saves you the hassle

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic