• Resolved hcj15

    (@hcj15)


    Hi,
    I’m trying to use an image to load an iframe, how can I do this?

    I managed to get the iframe code to work.

    [wp_colorbox_media url="https://url" type="iframe" hyperlink="click here to open external page"]

    but when I change the text inside hyperlink to <img src etc it does not work. Any ideas?

    https://www.ads-software.com/plugins/wp-colorbox/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter hcj15

    (@hcj15)

    I just noticed that if I link to the image with no variables in the hyperlink it will display the image.

    [wp_colorbox_media url="https://url" type="iframe" hyperlink="https://url/wp-content/uploads/2015/01/image.png"]

    What I would like is to be able to make it into a roll over, how can I do this? I have an image class for mouseover, could your script accept custom in the hyperlink section?

    <img class="mouseover" title="title" src="https://url/wp-content/uploads/2015/01/imagerollover1.png" alt="title" oversrc="https://url/wp-content/uploads/2015/01/imagerollover2.png" />

    Plugin Author Noor Alam

    (@naa986)

    You can embed it as HTML instead of shortcode. For example:

    <a class="wp-colorbox-iframe" href="https://url"><img class="mouseover" title="title" src="https://url/wp-content/uploads/2015/01/imagerollover1.png" alt="title" oversrc="https://url/wp-content/uploads/2015/01/imagerollover2.png" /></a>

    Thread Starter hcj15

    (@hcj15)

    many thanks that worked ??

    can I set the size of the iframe that is loading ?

    Plugin Author Noor Alam

    (@naa986)

    Unfortunately it comes from the wp-colorbox.js file. Currently the width and height are set to 80%.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘image to load iframe’ is closed to new replies.