Title: No sidebar.php file
Last modified: August 21, 2016

---

# No sidebar.php file

 *  [charliespider](https://wordpress.org/support/users/charliespider/)
 * (@charliespider)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/)
 * the plugin I work on uses some custom templates for it’s custom post types, and
   those templates utilize get_sidebar(), which throws the following error with 
   your theme:
 * > Notice: Theme without sidebar.php is deprecated since version 3.0 with no alternative
   > available. Please include a sidebar.php template in your theme. in \wp-includes\
   > functions.php on line 2968
 * thought you might like to know.

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

 *  Theme Author [presscustomizr](https://wordpress.org/support/users/nikeo/)
 * (@nikeo)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/#post-4365003)
 * Hi Brent, thanks for letting me know this.
    What is the plugin name please?
 *  Thread Starter [charliespider](https://wordpress.org/support/users/charliespider/)
 * (@charliespider)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/#post-4365010)
 * Thanks for getting back to me.
    I’m the lead developer for Event Espresso (www.
   eventespresso.com) and was just trying out a bunch of themes with an upcoming
   version of our core plugin that isn’t publicly available yet.
 * there’s a hook in get_sidebar() (/wp-includes/general-template.php line 85)
 * `do_action( 'get_sidebar', $name );`
 * that would have allowed an easy fix if only your sidebar file had been named:
 * **sidebar-class-content.php** instead of **class-content-sidebar.php**
 * So i don’t know off the top of my head what another easy solution would be.
 * This doesn’t really affect what I’m doing at all, I’m just trying to help you
   out. I like this theme btw.
 *  Theme Author [presscustomizr](https://wordpress.org/support/users/nikeo/)
 * (@nikeo)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/#post-4365023)
 * Ok. Thanks for the feedback
 *  [Giorgio25b](https://wordpress.org/support/users/giorgio25b/)
 * (@giorgio25b)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/#post-4365192)
 * Hi guys,
    did we figure out a solution yet?
 * I’m still trying to create a custom sidebar file for my CPT (‘projects’), something
   like sidebar-projects.php, but I can’t get it to work anywhere.
 * I also tried to put a standard sidebar.php in ../inc/parts but no luck.
 * Any suggestion Nikeo on how to solve this?
 *  Theme Author [presscustomizr](https://wordpress.org/support/users/nikeo/)
 * (@nikeo)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/#post-4365193)
 * Hi Giorgio, you might want to have a look to the [Widget Logic plugin](https://wordpress.org/plugins/widget-logic/):
   
   [https://wordpress.org/plugins/widget-logic/](https://wordpress.org/plugins/widget-logic/)
   It handles the WP conditional tags (including CPT conditions) very well, right
   below any widgets in the WP admin > widgets. Like for example `is_single() &&(
   get_post_type()=='projects')`
 * There’s also the php coding way. More advanced technique but still possible with
   [hooks API of the theme](http://themesandco.com/customizr/hooks-api/).
 * Hope this will help!
 *  [Giorgio25b](https://wordpress.org/support/users/giorgio25b/)
 * (@giorgio25b)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/#post-4365194)
 * Thanks Nikeo,
    but what I really want to achieve is having a custom sidebar file.
   php related to my CPT.
 * I have created a file called sidebar-projects.php but it does not kick in properly.
   
   I have also created a single-projects.php file and in this one I’m not sure how
   to hook my sidebar-projects.php
 * I know it is confusing, but I need to have a series of custom loops in my custom
   sidebar that are only displaying on my CPT pages.

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

The topic ‘No sidebar.php file’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

## Tags

 * [sidebar.php](https://wordpress.org/support/topic-tag/sidebar-php/)

 * 6 replies
 * 3 participants
 * Last reply from: [Giorgio25b](https://wordpress.org/support/users/giorgio25b/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/no-sidebarphp-file/#post-4365194)
 * Status: not resolved