Forums

Shortcode
caption shortcode (5 posts)

  1. candlelightnyc
    Member
    Posted 9 months ago #

    Need Help. How can I hyperlink the image captions on this page? Thanks
    http://www.mcat-prep-test.com/video-gallery/

    I tried these codes:
    [caption id="" align="alignleft" width="160" caption="Gaye Holud"]<img title="Gaye Holud" src="http://www.mcat-prep-test.com/photo-gallery/gaye-holud.jpg" alt="Gaye Holud" width="160" height="80" />[/caption]

    When I update the page, the codes get changed to this:
    <div class="mceTemp"><dl id="" class="wp-caption alignleft" style="width: 170px;"><dt class="wp-caption-dt"><img title="Gaye Holud" src="http://www.mcat-prep-test.com/photo-gallery/gaye-holud.jpg" alt="Gaye Holud" width="160" height="80" /></dt><dd class="wp-caption-dd"></dd></dl></div>

  2. TCBarrett
    Member
    Posted 9 months ago #

    I have not checked to see if there are any hooks into the core shortcodes. You could copy the caption code to make your own, adding any functionality you want.

    Like here: http://wordpress.org/support/topic/add-new-caption-shortcode-attribute?replies=8

  3. candlelightnyc
    Member
    Posted 9 months ago #

    I have tried these codes:
    [caption id="" align="alignleft" width="160" caption="Gaye Holud"]<img title="Gaye Holud" src="http://www.mcat-prep-test.com/photo-gallery/gaye-holud.jpg" alt="Gaye Holud" width="160" height="80" />[/caption]

    When I update the page, the codes get changed to this:
    <div class="mceTemp"><dl id="" class="wp-caption alignleft" style="width: 170px;"><dt class="wp-caption-dt"><img title="Gaye Holud" src="http://www.mcat-prep-test.com/photo-gallery/gaye-holud.jpg" alt="Gaye Holud" width="160" height="80" /></dt><dd class="wp-caption-dd"></dd></dl></div>

    http://www.mcat-prep-test.com/video-gallery/

  4. jenz
    Member
    Posted 9 months ago #

    Are you using the "HTML" tab in the editor and not the "Visual"? If you are using the "Visual" tab - try switching to the "HTML" tab and then pasting in the code above.

  5. Jackson
    Member
    Posted 9 months ago #

    WordPress captions do not natively support HTML, so your hyperlinks would be stripped out. There's this plugin:

    http://wordpress.org/extend/plugins/links-in-captions/

Reply

You must log in to post.

About this Plugin

About this Topic