WordPress.org

Forums

Making an Icon Image a link (8 posts)

  1. storminnorm73
    Member
    Posted 1 year ago #

    I am using a template for wordpress that has some icon image and text. I would like that icon image and text to be made into a link so when a user clicks on it it will take them to the correspoinding page. I understand how to make a link, however this one is throwing me for a loop.

    Here is the code:
    [/span3] [span3] [icon icon_type="Images" icon="icon_2" align="center"]
    <h4 style="text-align: center;">Cake</h4>
    <p style="text-align: center;">Lets eat some cake</p>

    I would like the image: Icon="icon_2", Cake, Lets eat some cake, all to be one link to the cake page.

    How can i do this?

    THANKS!

  2. LapanWebsite
    Member
    Posted 1 year ago #

    You need to create shortcode with do_shortcode for existing shortcode plus add text, style it, and put it all to be linked to same place.

    Functions exist for everything what you asked.
    But this what you want is a bit complicated and needs some work.

  3. storminnorm73
    Member
    Posted 1 year ago #

    I have no idea about functions. I guess I need to find someone that can assist.

  4. alchymyth
    Forum Moderator
    Posted 1 year ago #

    what theme are you using?

    did the shortcode come with the theme or is it from a plugin?

  5. storminnorm73
    Member
    Posted 1 year ago #

    the shortcode came with the theme.

  6. Evan Herman
    Member
    Posted 1 year ago #

    <a href="http://www.google.com" target="_blank">
       [icon icon_type="Images" icon="icon_2" align="center"]
       <h4 style="text-align: center;">Cake</h4>
       <p style="text-align: center;">Lets eat some cake</p>
    </a>

    Try that. I'm not sure what the first

    [/span3] [span3]

    is. It looks like an error on your end.

  7. storminnorm73
    Member
    Posted 1 year ago #

    Thanks Evan!

  8. Evan Herman
    Member
    Posted 1 year ago #

    No problem!

    Happy WordPress-ing!

Topic Closed

This topic has been closed to new replies.

About this Topic