PHP Value in Nextgen Shortcode
-
Hello everybody!
I want to call a Nextgen Gallery via a shortcode. In this shortcode i want to put a php value which i get from a custom field.
The value and the shortcode work on its own, but the combination doesn’t seem to work.<?php $nggid = the_field('gallerie'); $shortcode = "[ngg_images gallery_ids='{$nggid}' display_type='photocrati-nextgen_basic_slideshow']"; echo do_shortcode($shortcode); ?>
Gives out: “4Gallery not found. Please check your settings.”
(the “4” is the custom field value)Since i am not really literate in PHP, i hope that there is just a minor mistake that someone else can easily identify.
Thanks in advance!
Mattes
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Value in Nextgen Shortcode’ is closed to new replies.