Title: Changing header.php to custom header-custom.php breaks shortcode
Last modified: August 21, 2016

---

# Changing header.php to custom header-custom.php breaks shortcode

 *  Resolved [lundnick](https://wordpress.org/support/users/lundnick/)
 * (@lundnick)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/changing-headerphp-to-custom-header-customphp-breaks-shortcode/)
 * Great plugin, easy to configure, nice and simple worked great for adding a category
   for a rotating monthly donor article.
 * Small problem, I hope, I had to add a custom header for certain pages. When I
   add the header by `<?php get_header('custom'); ?>` (inserts header-custom.php
   instead of header.php) the page works up to the Posts in Pages shortcode, which
   i’m using in the template as `<?php echo do_shortcode("[ic_add_posts post_type
   ='donor' template='single-donor-month.php' showposts='1' orderby='date' order
   ='DSC' ] "); ?>`
 * Any idea what went wrong and what I need to do to correct?
 * Thanks
 * [https://wordpress.org/plugins/posts-in-page/](https://wordpress.org/plugins/posts-in-page/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [lundnick](https://wordpress.org/support/users/lundnick/)
 * (@lundnick)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/changing-headerphp-to-custom-header-customphp-breaks-shortcode/#post-4764495)
 * I figured it out, my error.
 * In my custom-post template, I was inserting the default header, and not the new
   header or no header.
 * It seemed like I had to have the get_header in the template, but it must remove
   if it’s the same, and error if different. Removing it fixed the problem I was
   experiencing.
 * Great plugin – Thanks

Viewing 1 replies (of 1 total)

The topic ‘Changing header.php to custom header-custom.php breaks shortcode’ is 
closed to new replies.

 * ![](https://ps.w.org/posts-in-page/assets/icon-256x256.png?rev=1596190)
 * [Posts in Page](https://wordpress.org/plugins/posts-in-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-in-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-in-page/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-in-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-in-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-in-page/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [lundnick](https://wordpress.org/support/users/lundnick/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/changing-headerphp-to-custom-header-customphp-breaks-shortcode/#post-4764495)
 * Status: resolved