Use shortcode value for text block
-
Hello. I am experimenting with 2 columns of numbers in CSV upload that generates pages with URLs such as .com/1-by-2 which may have shortcodes eg {{firstcol}} and {{secondcol}}
The pages then generate from template to say eg. ‘Your size is {{firstcol}} by {{secondcol}}’ where the shortcodes are replaced by the numbers. This works so far.
If the number in the first column is in a certain range and results as true, I want to to show a particular paragraph of text and similarly for the second number for particular ranges show different paragraphs. (I then want to add the plot of these two numbers onto a graph shown as an image on that page.)
Is there a way to say that if the value of {{firstcol}} is greater than X but less than y then show the following text block as PHP in the post template? Will the values be processed in the shortcode output in the post as integers or strings? ie can I query the numerical value as a range? How can I retrieve your shortcode output value to query if it is in range if using php?
What would be the best way to plot the chart rather than storing thousands of variations of chart plots as images? Thank you.
- The topic ‘Use shortcode value for text block’ is closed to new replies.