WordPress.org

Support

Support » Plugins and Hacks » [Resolved] adding email link

[Resolved] adding email link

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

    @tobiasbg

    Hi,

    thanks for your question!

    There are two solution for this:
    The manual one would be to create a link for each email address, by using the “Insert Link” button below the table input fields. When asked for the URL for the link, you’d have to enter the email right after the “mailto:” keyword, as in

    mailto:info@example.com

    The second solution is the automatic solution. There’s a TablePress Extension at http://tablepress.org/extensions/automatic-url-conversion/ that you can use and that will automatically convert all email addresses into clickable links.

    Regards,
    Tobias

    WillBrody
    Member

    @willbrody

    Hi Tobias,

    For a table of about 250 lines, that will be based on data that is updated once/week, I’d like each line to be clickable. From your answer above, I believe the only way I can have a clickable link in a table cell from imported data is if the cell value starts off as a URL and is then converted to an HTML live link through the automatic url conversion extension. I presume I cannot have a word in the table cell automatically become a hyperlink, is that correct?

    Plugin Author TobiasBg
    Participant

    @tobiasbg

    Hi,

    thanks for your question.

    Well, yes, the “Automatic URL conversion” Extension can only turn URLs into automatically clickable links.
    To have a certain word made clickable, you would have to specify the intended target URL somehow. One possibility for this would be a custom Extension that uses PHP code to do this. How is the target URL defined in your case, or where is it stored? Can you maybe post an example of what you are trying to do?

    Regards,
    Tobias

    WillBrody
    Member

    @willbrody

    For this particular table I am creating, the URL that I would like the word in column one of each row to link to would be the address of a page within the WordPress site.

    Here’s an example of a table created with your TablePress and url extension with phony data in it

    http://expansion.vedicpandits.org/countryaffinity-funds-using-import-function

    you’ll likely need this password to take a look because I didn’t want it viewed with its phony data, while it’s under development

    NOTforSHARING

    This table was created from data in a .csv file on the same server as hosts WordPress.

    The ideal table would have the country names as links leading to pages within WordPress which would offer more detailed information. My test table here adds a third column which holds the url (only set up for United Kingdom). Which is OK, if not as elegant as having a clickable link.

    Plugin Author TobiasBg
    Participant

    @tobiasbg

    Hi,

    thanks for the example!

    Well, as the URLs can not really be determined uniquely from the rest of the table data, there’s no real way to do this automatically here. So, you will have to add the URL to the table manually anyway. Basically, it’s now your choice to either add it to that new third column (you can then use the “Automatic URL conversion” Extension), or to add it as link HTML to the first column directly. That would give you the design that you prefer, but it would be more work, as you’d have to write HTML code manually.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] adding email link’ is closed to new replies.