Title: Shortcode causing error in admin panel, after update
Last modified: August 20, 2016

---

# Shortcode causing error in admin panel, after update

 *  [andre77](https://wordpress.org/support/users/andre77/)
 * (@andre77)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/shortcode-causing-error-in-admin-panel-after-update/)
 * I’ve set up a shortcode function in functions.php. The shortode prints out text
   from a specific post.
 *     ```
       add_shortcode('volunteer_info', 'volunteer_info');
       function volunteer_info()
       {
       	global $post;
       	$id = '3295'; //set the post id here
       	$thePost = get_post($id); //get the post
   
       	setup_postdata($thePost); //setup the post
       	the_content(); //print out the content
       }
       ```
   
 * The code seems to be working as it should, as the text gets printed on the actual
   webpage. But annoyingly, each time I type in the shortcode in the adminpanel (
   HTML tab), and press update the adminpanel crashes with the following error.
 * Warning: Cannot modify header information – headers already sent by (output started
   at /storage/content/42/134142/domain_name/public_html/wp-includes/post-template.
   php:169) in /storage/content/42/134142/domain_name/public_html/wp-includes/pluggable.
   php on line 934
 * Is there any way of getting rid of this error message?

The topic ‘Shortcode causing error in admin panel, after update’ is closed to new
replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [andre77](https://wordpress.org/support/users/andre77/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/shortcode-causing-error-in-admin-panel-after-update/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
