Title: do_shortcode inside loop doesn&#8217;t pull correct post data
Last modified: January 19, 2017

---

# do_shortcode inside loop doesn’t pull correct post data

 *  [memaddog](https://wordpress.org/support/users/memaddog/)
 * (@memaddog)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/do_shortcode-inside-loop-doesnt-pull-correct-post-data/)
 * I have a custom field (using Meta Boxes) to add MP3 files to a custom post type.
   When I use the default [audio] embed, everything works as expected. I installed
   this plugin and am using do_shortcode like so…
 * echo do_shortcode(‘[crazyplayer_narrow title=”‘.get_the_title().'” artist=”…
 * The shortcode is getting the data from the first/oldest post including the title
   as you see from my snippet and also the mp3 file when I inject that.
 * I can echo the current/correct page information – including the mp3 url – before
   and after the shortcode so I know the loop is fine. The rest of the loop output
   is good – it’s only the audio player that displaying the wrong info.
 * Also, only the top/newest post on the page displays the audio player. Each subsequent
   post on the (customer archive) page doesn’t include a player.
 * As I’m writing this out, it seems the issue may be simply that this plugin doesn’t
   allow for multiple players on the same page. Which is very unfortunate.
 * If you’re able to comment, I would still love to hear you thoughts.

The topic ‘do_shortcode inside loop doesn’t pull correct post data’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/crazyplayer_4c1b47.svg)
 * [Crazy Player](https://wordpress.org/plugins/crazyplayer/)
 * [Support Threads](https://wordpress.org/support/plugin/crazyplayer/)
 * [Active Topics](https://wordpress.org/support/plugin/crazyplayer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/crazyplayer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/crazyplayer/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [memaddog](https://wordpress.org/support/users/memaddog/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/do_shortcode-inside-loop-doesnt-pull-correct-post-data/)
 * Status: not resolved