• Resolved oceanw

    (@oceanw)


    Hi,

    Thanks for creating such a fantastic free table plugin. So far this is the best I ever used.

    I am creating a simple table manually. Just would like to check if there is a way to attach link to image. As now when I attach a link, the existing image in the cell will disappear or be replaced by text. Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hello. 

    Firstly, thank you for the kind words about the plugin, we truly appreciate it. 

    In regards to making images work as links, yes, you can do this with Custom HTML in our tables. 

    But you will have to write the HTML directly in the Simple Table’s cells.

     I see what you mean, if you first add an image to a cell, then go to the top right to make a link from this cell via our built-in Simple Table “link” option,

    in this case what you set up in the “Link Editor” is going to completely overwrite the content of that cell, with what you set as the “URL link”, the “displayed Link text”, etc.

    Now the previous image ( or any other content the cell had) will be overwritten with what you set up in the “Link Editor”.

    The solution will be to input your Custom HTML fully, without using our Link Editor,
    by creating a link as an image directly in the cell.

    You can check out this guide on how to make links as images? with examples.

    I will take their first example and apply it to a cell in this Simple Table, like this :

    <a ><img src="https://www.tutorialspoint.com/assets/questions/media/426142-1668760872.png"></a>

    ?and it renders in the table as a “clickable” image link.

    Let us know if that helps. ??

    Thread Starter oceanw

    (@oceanw)

    Thanks for the detailed explanation. Really appreciate it.

    In order to open it in a new tab and avoid tabnabbing, I added target=”_blank” rel=”noopener noreferrer” behind the url. Hope this is fine.

    <a  target="_blank" rel="noopener noreferrer"><img src="https://www.tutorialspoint.com/assets/questions/media/426142-1668760872.png"></a>
    Plugin Author wpDataTables

    (@wpdatatables)

    Hello.
    No problem, you’re welcome.
    Yes, we checked and that looks perfect,
    by adding the “target” blank attribute and the “rel” as noopener and noreferrer ,
    you have effectively set it to open in a new tab,
    the link’s target loading in the same tab where the link was clicked,
    and the backlink from appearing as referral traffic in the destination site’s analytics, as explained on this article.
    Please don’t hesitate to open a new Post for anything else we might help with.
    Kind regards.

    Thread Starter oceanw

    (@oceanw)

    Thanks. You have the most awesome support for a free plugin.

    Plugin Author wpDataTables

    (@wpdatatables)

    Hello.
    I am delighted to hear that this has been resolved. Thank you for letting us know and thank you very much for the kind words about our Support. Please don’t hesitate to create new Posts for anything else we could assist with.

    Have a great day! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Attach link to image’ is closed to new replies.