Title: Shortcode issue
Last modified: August 20, 2016

---

# Shortcode issue

 *  Resolved [stuart_edwards5](https://wordpress.org/support/users/stuart_edwards5/)
 * (@stuart_edwards5)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/shortcode-issue/)
 * Hi there, I’m not sure if I’ve posted this problem in the correct section of 
   the forum. I hope someone can help either way.
 * [Am I Nearly There Yet?](http://aminearlythereyet.com)
 * I’m attempting to add some shortcode to the bottom of my posts. I’ve so far had
   sucsess adding the below code to my function.php file.
 *     ```
       add_shortcode('stuart', 'stuartBotPost');
   
       function stuartBotPost() {
           return '
               <div class="whoweare">
                   	<img src="http://www.gravatar.com/avatar/b80039d3cf7dbfdf4d25130b06c08802.png" alt="mini Stu"/>
       		<h4>About the author</h4>
                   	<p>Stuart Edwards is the co-head Honcho at Am I Nearly There Yet?. He likes travelling, single malt whiskey, web design and all things techie. Not necessarily in that order. Read more about Stuart <a href="http://aminearlythereyet.com/authors">here</a>.</p>
               </div>';
       }
   
       add_filter('widget_text', 'do_shortcode');
       ```
   
 * That works fine. Now when I add another shortcode, it results in failure and 
   the page fails to load.
 *     ```
       add_shortcode('eloise', 'eloiseBotPost');
   
       function eloiseBotPost() {
           return '
               <div class="whoweare">
                   	<img src="http://www.gravatar.com/avatar/e44c4f6b5e6d25ff3ae8ef328c014099.png" alt="Eloise mini"/>
       		<h4>About the author</h4>
                   	<p><p>Eloise Rodgers is the co-founder of Am I Nearly There Yet?. When not seeking out the best local vegan cuisine, she's travelling the globe looking for it. She likes vintage things and making beautiful <a href="http://thehatqueen.com" target="_blank">hats and head pieces</a>.Read more about Eloise <a href="http://aminearlythereyet.com/authors">here</a>.</p>
              </div>';
       }
       ```
   
 * Now, if I delete the bulk of the content within the <p> tags, it works. I’ve 
   experimented a little bit. If I leave the bulk of the content the _same_ as the[
   stuart] shortcode, it works fine! What’s that about?!
 *     ```
       add_shortcode('eloise', 'eloiseBotPost');
   
       function eloiseBotPost() {
           return '
               <div class="whoweare">
                   	<img src="http://www.gravatar.com/avatar/e44c4f6b5e6d25ff3ae8ef328c014099.png" alt="Eloise mini"/>
       		<h4>About the author</h4>
                   	<p>Eloise Rodgers is the co-head Honcho at Am I Nearly There Yet?. He likes travelling, single malt whiskey, web design and all things techie. Not necessarily in that order. Read more about Stuart <a href="http://aminearlythereyet.com/authors">here</a>.</p>
               </div>';
       }
       ```
   
 * Is there a maximum character allowance within the shortcode that causes this 
   to fail?
 * Does the shortcode formatting have to be **exactly** the same as the shortcode
   above it?
 * I’m not a PHP whizz unfortunatley. I just can’t figure this out, seems totally
   bizzare!

Viewing 1 replies (of 1 total)

 *  Thread Starter [stuart_edwards5](https://wordpress.org/support/users/stuart_edwards5/)
 * (@stuart_edwards5)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/shortcode-issue/#post-2459030)
 * Found the problem.
 * The ‘ in my HTML was spoiling the day.
 * Back to HTML school for me!

Viewing 1 replies (of 1 total)

The topic ‘Shortcode issue’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [stuart_edwards5](https://wordpress.org/support/users/stuart_edwards5/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/shortcode-issue/#post-2459030)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
