Title: Shortcodes
Last modified: August 20, 2016

---

# Shortcodes

 *  Resolved [rdart](https://wordpress.org/support/users/rdart/)
 * (@rdart)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/)
 * My shortcodes won’t work in my theme. I am currently trying to get eShop to work.
   It doesn’t matter which pulgin I try, shortcodes just don’t work! I sticked to
   twenty ten and the shortcodes work, so it is obviously a problem with my coding
   somewhere.
 * I am new to WordPress and PHP, so I am really lost right now. I would love it
   if someone could take a look, and I can post some code here as well. I have a
   deadline for this site of the 22nd, and I have been posting everywhere for the
   last few weeks to no avail. Please let me know if you can help!
 * You can see the shortcode problem in action here:
    [http://www.guilt-free-goodness.com/blog/shopping-cart](http://www.guilt-free-goodness.com/blog/shopping-cart)
 * Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144069)
 * Ensure that your theme’s single post & page templates are using `<?php the_content();?
   >`.
 *  Thread Starter [rdart](https://wordpress.org/support/users/rdart/)
 * (@rdart)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144078)
 * Thank you! So far it looks like it is working, now I just have to rearrange some
   of the shortcodes and clean it up! Thanks! For some reason, my pages were using
   <?php echo $post->post_content; ?> so it wasn’t calling correctly. Thanks again!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144212)
 * No problem 🙂
 *  Thread Starter [rdart](https://wordpress.org/support/users/rdart/)
 * (@rdart)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144226)
 * So after organizing it a little bit, it made each post call on the same text,
   and now the only thing that is working is one pages shortcode. It worked, but
   now all posts have the same text!
 * For each page to have the original text, it works using this: <?php echo $post-
   >post_content; ?>
 * For the shortcode to work, I used <?php the_content();?>
 * Is there a way to get both of them to work? The shortcode seems to only working
   on subpages.
 * Thank you so much, sorry to bug you again!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144230)
 * > now all posts have the same text!
 * In that case, there is something seriously wrong with your theme. You can confirm
   this by switching to Twenty Ten to see if that resolves the issue.
 *  Thread Starter [rdart](https://wordpress.org/support/users/rdart/)
 * (@rdart)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144233)
 * It works in Twenty Ten. I wish I knew where the problem was coming from, I will
   go look through the php again… I don’t know if you would mind taking a look or
   not, but I really need this problem to go away! On the bright side, everything
   else works. Thanks again!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144235)
 * You really shouldn’t be using `$post->post_content` to display unfiltered content.
   Added to which, many other plugins will depend upon the_content filter.
 *  Thread Starter [rdart](https://wordpress.org/support/users/rdart/)
 * (@rdart)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144236)
 * I agree, but it was what I was told to use originally. Now that I have done more
   research, the <?php the_content();?> is the way to go, but for some reason it
   is blocking out my content in my posts. Would you mind if I emailed you my log
   in so you could take a look?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144238)
 * > it was what I was told to use originally
 * Then someone gave you bad advice. General rule of thumb: always use the_content()
   or the_excerpt() unless you’re getting into advanced coding for a plugin or similar.
 * If the_content() isn’t working for you, then something is wrong with your Loops.
   Try reviewing [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 *  Thread Starter [rdart](https://wordpress.org/support/users/rdart/)
 * (@rdart)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144239)
 * I totally agree, all of the research is revealing that. I will look into the 
   loop a little more then, and see what I can do to fix everything. Hopefully it
   all comes together before tomorrow!
 *  Thread Starter [rdart](https://wordpress.org/support/users/rdart/)
 * (@rdart)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144246)
 * Just as an update – I changed over my page/post format to look more like the 
   loop-page.php setup that is in the twenty-ten theme, and after some arranging
   it looks like everything works now. Thank you so much for your help! Without 
   your suggestion I would not have been able to fix this.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144248)
 * Glad I could help 🙂
 *  [sf23103](https://wordpress.org/support/users/sf23103/)
 * (@sf23103)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144472)
 * I am having the same problem. Shortcodes do not work (they display the actual
   shortcode). If I replace `<?php echo $ps->post_content;/*the_content();*/ ?>`
   with `<?php the_content();?>` then the same content displays for every post!
 * Any ideas? The following is my single.php file
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Shortcodes’ is closed to new replies.

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 13 replies
 * 3 participants
 * Last reply from: [sf23103](https://wordpress.org/support/users/sf23103/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/shortcodes-4/#post-2144472)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
