Title: WordPress shortcode
Last modified: August 20, 2016

---

# WordPress shortcode

 *  [rize](https://wordpress.org/support/users/rize/)
 * (@rize)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/wordpress-shortcode/)
 * I’m using this plugin “[Slideshow Gallery](http://wordpress.org/extend/plugins/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)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/wordpress-shortcode/#post-2172035)
 * 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](https://wordpress.org/support/users/rize/)
 * (@rize)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/wordpress-shortcode/#post-2172040)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [rize](https://wordpress.org/support/users/rize/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/wordpress-shortcode/#post-2172040)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
