• I’m using this plugin “Slideshow Gallery
    it works but I want to put it outside the post (on my single.php) to be able to float: right it..

    This is the plugin’s shortcode [slideshow post_id="#"]

    Here’s what I’m trying to achieve

    <?php echo do_shortcode("[slideshow post_id="<?php the_ID(); ?> "]"); ?>

    But it’s not working. anyone know how to do it?
    Note: I placed it inside the loop

Viewing 2 replies - 1 through 2 (of 2 total)
  • try to use string concatenation within the code; and use the wordpress function that return the value; and use single quotes to wrap the string, so you can have the double quotes in the code:

    example:

    <?php echo do_shortcode('[slideshow post_id="'.get_the_ID().'"]'); ?>

    (untested)

    Thread Starter rize

    (@rize)

    Wow thanks it worked!

    I’ll research more on concatenation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress shortcode’ is closed to new replies.