vSlider – in WordPress I’m using the function supplied in the FAQs:
<?php if(function_exists('vslider')){ vslider('vslider_options'); } ?>
And I’m trying to do this. So its knows to get the post-ID as its name. But its not working.
<?php if(function_exists('vslider')){ vslider('<?php the_ID(); ?>'); } ?>
You cannot nest
<?php ?>inside an already open<?php ?>. That is unsupported and syntactically invalid. Just call the function in place.Apparently,
the_ID()is one of those WordPress functions which prints to the output buffer without returning its value. To get the id returned where it can be useful in a function, useget_the_ID()instead.The syntax issue becomes more obvious when expressed as properly indented code.