You could try the do_shortcode function eg,
do_shortcode(‘[jj-ngg-jquery-cycle gallery=”1″]’);
Check the description for more details about the shortcode parameters and how to use it.
http://wordpress.org/extend/plugins/jj-nextgen-jquery-cycle/
Regards,
JJ Coder
Ok so I probably miss a thing here. I’ve added the following code into my header:
<div id="cycle_lite"><?php do_shortcode('[jj-ngg-jquery-cycle gallery="1" order="asc" html_id="cycle_lite" width="940" height="130"]'); ?></div>
But nothing appears once I refresh my page. I checked the gallery’s ID, it’s good.
Nextgen gallery & jquery-cycle plugins are working fine. I’m not familiar with WordPress API so sorry if I ask a dummy question 😉
Thank you for your help.
Pipolaye
Hey Pipolaye,
Try putting echo before do_shortcode
<?php echo do_shortcode...
Regards,
JJCoder
Ok we are progressing, I’ve put:
<div id="cycle_lite"> <?php echo do_shortcode('[jj-ngg-jquery-cycle html_id="cycle_lite" width="940" height="130" order="random" timeout="7000" gallery="1"]'); ?> </div>
A banner appears, but it’s strange:
My gallery has 4 banners. Only the first and the third are showed.
Take a look here:
http://www.jpgitta.fr
Instead of the second and fourth banner, the following code is appearing with firefox in the page:
jQuery('div#cycle_lite').jjcycle({timeout: 7000,height: 130});
I think that the do_shortcode function is broken somewhere, haven’t found where at the moment.
Hey Pipolaye,
I think I can see the problem. You have two id=”cycle_lite” you can either use the shortcode parameter html_id=”some_other_id” or change the div id of the container you have put the shortcode into.
Regards,
JJCoder
Thank you! Everything is working fine now.
Great module 🙂
Regards,
Pipo
I am completely new in the area of WordPress. What Pipolaye described, is exactly what i’m trying to do. Could either one of you indicate the ‘exact place’ within the header.php where the shortcode should be inserted? And does that replace a piece of code, of is it just added…
I’m quite impressed by WordPress and it’s plugins…
Thanks for your help.
Regards,
Frans
f.j. you can just put whatever you want to appear, use like this:
<?php echo do_shortcode('[jj-ngg-jquery-cycle gallery="1"]'); ?>
to give more adjustments look here:
http://wordpress.org/extend/plugins/jj-nextgen-jquery-cycle/
I hope this help you.
Cheers from Argentina!