Title: Call Custom Sidebar via PHP
Last modified: August 22, 2016

---

# Call Custom Sidebar via PHP

 *  Resolved [xiot](https://wordpress.org/support/users/xiot/)
 * (@xiot)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/call-custom-sidebar-via-php/)
 * Hi,
 * first of all, this plugin is really great!
 * I have a problem right now. I have a plugin which needs me to edit a specific
   file to display the wanted content. But it’s not a real custom page template.
   So I declared it as a template and thought I could then easily change the sidebar
   to a custom. Problem is I found out that custom sidebars can only change custom
   post types globally. Is that correct?
    If so I would like to know if it’s possible
   to call a custom sidebar when i change <?php get_sidebar(); ?> to whatever it
   would be?
 * Best regards, Lars
 * [https://wordpress.org/plugins/custom-sidebars/](https://wordpress.org/plugins/custom-sidebars/)

Viewing 1 replies (of 1 total)

 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/call-custom-sidebar-via-php/#post-5546334)
 * Hi Lars,
 * I hope you are well today and thank you for your question.
 * You can display the Custom Sidebars on any custom post types and also on default
   post & pages.
 * You can also display custom sidebar on specific pages by configuring it in the
   Sidebars metabox in edit page screen so you can display the custom sidebar on
   the pages which have been assigned your custom page template therefore you don’t
   need to add any code in your custom page template file.
 * Please advise if you have more questions.
 * Best Regards,
    WPMU DEV

Viewing 1 replies (of 1 total)

The topic ‘Call Custom Sidebar via PHP’ is closed to new replies.

 * ![](https://ps.w.org/custom-sidebars/assets/icon-256x256.png?rev=1414065)
 * [Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager](https://wordpress.org/plugins/custom-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-sidebars/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/call-custom-sidebar-via-php/#post-5546334)
 * Status: resolved