Dynamic Shortcode-Parameter

When using the WordPress-Shortcode [jsoncontentimporter] or [jsoncontentimporterpro] the parameter “url” is mandatory and otherl like “basenode” are optional. If you want to have those parameter dynamic, one way is the PRO-version. The other using the free Version plus two other plugins.

How does this work?

  • Install and activate the Plugins Insert PHP and
    WordPress Custom Global Variables
  • “WordPress Custom Global Variables”: Add a parameter named “paramone” and a value as you like…
  • Create a new page or post and insert something like the following:
    [jsoncontentimporter
    url=”[insert_php]echo do_shortcode(‘[global_variable variable_name=”paramone”]’);[/insert_php]”]…
  • When displaying the page / post WordPress will first evaluate the inner “global_variable” shortcode, then the “insert_php” and at last the “jsoncontentimporter” shortcode. Hence you can store the URL-value at one central place instead at several pages or posts
  • With the PRO-version you can define a template (URL, placeholdertext…) and call this in a page or post via an ID. So no other third party plugins are needed there…