Embedding a Variable in shortcode
-
Hi,
I have shortcode tag on a template page like so…
<?php echo do_shortcode('[nggallery id=1 template="galleryview"]'); ?>However, where it says ‘id=1’ I would like to insert a variable so the client can say which gallery id to use. But when I use ‘$gallery_id’ instead it doesn’t work so I was just wondering does anybody know the correct syntax to achieve this?
Many thanks for any help/ advice.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Embedding a Variable in shortcode’ is closed to new replies.