• Resolved David181

    (@david181)


    Hi there,

    I want to reuse a value in a certain cell as a variable to create a link.

    Example:
    Text A | Text B | Link

    If Text A has the Value “year2020”, I want to reuse that as a variable to create the link “example.com/year2020”.

    It’s not so much about the link, more about the idea of linking to a certain cell and just have to change the value in one cell if needed.

    Is there a way to use a value in the same table as a variable and reuse it in the same table?

    Thanks!

    • This topic was modified 5 years, 10 months ago by David181.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I see what you mean, but unfortunately, I’m not aware of a solution for that 🙁

    While there is a TablePress Extension that allows to retrieve a single cells value, see https://tablepress.org/extensions/table-cell-shortcode/, this will not work inside HTML code for a link. WordPress is preventing the evaluation of Shortcodes inside HTML code, for security reasons.

    Regards,
    Tobias

    Thread Starter David181

    (@david181)

    Hi Tobias,

    no worries, that’s fine. Therefore I just copy & paste, sometimes the manual way is the most straight forward one.

    Thanks and best,
    David

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi David,

    yes, that will be the process to use here then. Sorry for not having an easier solution.

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Use cell content as variable’ is closed to new replies.