Hi,
thanks for your post, and sorry for the trouble.
What do you mean with “column G” here? References can only be to single cells, but not to columns. Also, these references only work in TablePress formulas, but can not be used in Shortcodes like that. For that, the TablePress Single Cell Shortcode Extension from https://tablepress.org/extensions/table-cell-shortcode/ can be used – however, that also can not directly be used inside another Shortcode, due to how the WordPress Shortcode system works.
So, unfortunately, I can’t really think of a solution for this here, sorry…
That said, from my experience, I don’t really think that the scenario that you describe as the motivation for your Shortcode really is that common. First, WordPress actually maintains internal redirects when posts/pages are moved (i.e. get a new slug), so that you would be redirected automatically. And if the domain name changes, you could easily fix that using one of the available search/replace plugins (or, you could even leave out the domain from the link and use relative URLs (starting with / to indicate that it’s relative to the document root).
Regards,
Tobias
Hi again,
hold, this might actually work with a formula like
=[pl id="{G2}"]
where G2 would be the cell that contains a purely numeric ID.
Regards,
Tobias
Thread Starter
AlexPR
(@alexpr)
I see your point. Unfortunately I would need to refer to a whole column (similar to Excel). Could we use a DataTables function instead, e.g. the function Columns.Render?
-
This reply was modified 5 years ago by
AlexPR.
-
This reply was modified 5 years ago by
AlexPR.
Hi,
but how do you refer to a whole column? Or do you basically repeat this for every cell in the column?
I don’t think that the DataTables approach would help, as that would all run in the browser, but you need the information on the server.
Regards,
Tobias
Thread Starter
AlexPR
(@alexpr)
That makes perfectly sense.
Thank you very much, Tobias.