Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Johan van der Wijk

    (@vanderwijk)

    Hi, it is currently not possible to show the post image when using the shortcode but it is an excellent idea and I shall put this on the list for future implementation.

    My plugin Post Link Shortcodes will allow for this for any post type that supports the featured image as well as attachments in the upcoming 0.4 release.

    The syntax for rendering an image using the content block’s featured image would be like this: [content_block_img some-content-block-slug size=medium] where size is an optional attribute which defaults to full size. You may also add any other attribute you wish which then translates into html attributes on the <img> !

    To only return the image src, the shortcode is similar [content_block_src].

    Like I said, this isn’t possible with the current stable version, but if you wanted to try it out before it’s released, you can always preview it by checking out the source on GitHub.

    Depending on when you read this, it may already be released ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘show post image with shortcode’ is closed to new replies.