Hi there,
I have been trying to add a custom sidebar (id='ups-sidebar-bulletin-board) to my custom post type ‘bulletin_board’ - which uses the standard wp single post template with sidebar - but something does not seem to be working.
I added this code to the child theme functions.php file
// ADD SIDEBAR TO CUSTOM POSTS
// =============================================================================
function add_sidebar_custom_post() {
if( get_post_type() == ‘bulletin_board’) {
return ‘ups-sidebar-bulletin-board’;
}
}
add_filter( ‘ups_sidebar’, ‘add_sidebar_custom_post’ );
It does make my custom sidebar show up on my CPT, but it makes the main sidebar disappear from my standard posts.
Am i missing something?
Thanks,
Sophie