Reusing code/snippets w/ variables
-
With the old system, I was using the following to generate my own gallery solution within pages as such:
[insert_php] $aid = 1234; include('/path/to/script.php'); [/insert_php]
This new system appears to want me to make a separate snipped for each possible one, and then change the above in pages to the new format. Already having to change 100s of pages will be cumbersome (I do intend to be re-doing this site with CPTs and custom-made plugins at some point, but this will be a long process), and this looks to be doubled having two places to manage code instead of just one. Is there a way to have a single snippet created with the variable passed in the shortcode within the page? Or am I better off sticking with the old system as I work to re-do a lot of this site?
- The topic ‘Reusing code/snippets w/ variables’ is closed to new replies.