Title: sidebar in php
Last modified: August 31, 2016

---

# sidebar in php

 *  Resolved [stavroch](https://wordpress.org/support/users/stavroch/)
 * (@stavroch)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/sidebar-in-php/)
 * How can I display the sidebar in page.php – template page?
 * I want to display the sidebar in specific place.
 * [https://wordpress.org/plugins/custom-sidebars/](https://wordpress.org/plugins/custom-sidebars/)

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

 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years ago](https://wordpress.org/support/topic/sidebar-in-php/#post-7355053)
 * Hey there stavroch,
 * Hope you’re well today 🙂
 * Custom Sidebars can’t add a sidebar to your template or a page for that matter,
   plugin can only replace existing sidebars that are already called in your theme.
 * In regards to adding a sidebar to page template that should be done by using 
   get_sidebar functions, you can find more information here: [https://developer.wordpress.org/reference/functions/get_sidebar/](https://developer.wordpress.org/reference/functions/get_sidebar/)
 * Best regards,
    Bojan
 *  [DragoWeb](https://wordpress.org/support/users/dragoeco/)
 * (@dragoeco)
 * [10 years ago](https://wordpress.org/support/topic/sidebar-in-php/#post-7355075)
 * Hello Bojan, how are you today? For my part, I’m ok but have a little (and probably
   easy to solve) problem 🙂
 * I used get_sidebar function into my custom template but I cannot find the name
   I gave to it on the widget options. Here is the code :
 *     ```
       <?php
       /* Template Name: Custom Forum */
       get_header();
   
       global $wp_pro_forum_page;
       ?>
   
       <div id="forum-single">
           <div id="content" class="block clearfix">
       		<div id="primary" class="hfeed" role="main">
       			<?php $wp_pro_forum_page->pro_forum_single_page(); ?>
       		</div>
       		<?php get_sidebar("forum-single"); ?>
           </div>
       </div>
   
       <?php
       get_footer();
       ?>
       ```
   
 * What do I have to do more for the sidebar’s name “forum-single” will be displayed
   in the option “sidebar location”?
 * Thanks you in advance and I wish you to have a good day 🙂
 * Pierre
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years ago](https://wordpress.org/support/topic/sidebar-in-php/#post-7355081)
 * Hey Pierre,
 * I believe it would be easiest to actually call one of the registered sidebars
   that you already have in your theme on that specific template and then simply
   replace that sidebar using Custom Sidebar functionality.
 * Just search through your theme files for “register_sidebar” so you can find proper
   sidebar ID, usually that would be in theme functions.php and call that sidebar
   on your custom template. You should be able to easily replace that sidebar on
   that specific page in your WP admin by using already built in functionality from
   our plugin.
 * Alternatively you can search for the sidebar ID by inspecting that page in admin
   and try calling it directly, see screenshot [http://screencast.com/t/Tmb7Eo59nY](http://screencast.com/t/Tmb7Eo59nY).
 * Hope this helps 🙂
 * Cheers,
    Bojan
 *  [DragoWeb](https://wordpress.org/support/users/dragoeco/)
 * (@dragoeco)
 * [10 years ago](https://wordpress.org/support/topic/sidebar-in-php/#post-7355084)
 * Hi Bojan, Thanks a lot for your answer. It was really helpful. Thanks also for
   giving time to provide detailed answers to us 😉 I wish you to have a great day.
   
   Pierre
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years ago](https://wordpress.org/support/topic/sidebar-in-php/#post-7355085)
 * Hey Pierre,
 * Glad I could help! Have a great day too 🙂
 * Cheers,
    Bojan

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

The topic ‘sidebar in 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/)

 * 5 replies
 * 3 participants
 * Last reply from: [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/sidebar-in-php/#post-7355085)
 * Status: resolved