Use of variables within PHP shortcode
-
Hi,
I would like to use variables in Php Shortcode to be able to use parameters when calling a shortcode from WP Code Manager.
As example :
– Page content :[cmruncode name=”Generic Table Listing” tablename=”MyTable” whereclause=”1″]
– Snippet code : something like …
…
$sql = “SELECT * FROM “.$tablename.” WHERE “.$whereclause.”;”;
…Is it possible with WP code manager ?
If yes what is exactly the syntax within the snippet ?Thank you.
RogerPS : It works with the plugin “Post Snippet”, but I prefer to use your plugin.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Use of variables within PHP shortcode’ is closed to new replies.