WordPress.org

Support

Support » Plugins and Hacks » Hacks » Need image shorcode with href and alt

Need image shorcode with href and alt

  • In every post, I need to add the following html/javascript code, which includes 3 images with a rolloever effect:

    <p style="text-align: center;">
    <a rel="nofollow" href="/go/link"><img src="/files/button1_o.png"
     title="enter text here" alt="text here" name="enter text here"
     width="130" height="47" border="0" id="enter text here"
    class="nohover"><img src="/files/button1.png" alt="enter text here"
     name="enter text here" width="130" height="47" border="0" id="enter
    text here" class="hover"></a> 
    
    <a rel="nofollow" href="/go/link"><img
     src="/files/button2_o.png" title="enter text here" alt="enter text
     here" name="enter text here" width="130" height="47" border="0"
    id="enter text here" class="nohover"><img src="/files/button2.png"
    alt="enter text here" name="enter text here" width="130" height="47"
    border="0" id="order" class="hover"></a> 
    
    <a rel="nofollow" href="/go
    /link"><img src="/files/button3_o.png" title="enter text here"
    alt="enter text here" name="enter text here" width="130" height="47"
    border="0" id="play" class="nohover"><img src="/files/button3.png"
    alt="enter text here" name="enter text here" width="130" height="47"
    border="0" id="enter text here" class="hover"></a>
    </p>

    It’s quite cumbersome to do this in every post, and am trying to figure out how to do this with a short code. The images are always the same, but the alt/title text change, along with the href link.

    Is there a way to do this with a shortcode? Maybe something like

    [images link="http://thelink.com" alt="alt text"]

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need image shorcode with href and alt’ is closed to new replies.
Skip to toolbar