Hi all
I’ve got a widget search categories in my blog (http://residenciadonperro.com/tablon/). Is there any way to keep this widget in the individual posts?
Regards
Hi all
I’ve got a widget search categories in my blog (http://residenciadonperro.com/tablon/). Is there any way to keep this widget in the individual posts?
Regards
Hi There,
You have to setup and activate the X child theme first.
After adding this custom code under functions.php file locates in your child theme:
add_filter( 'ups_sidebar', 'x_single_post_sidebar' );
function x_single_post_sidebar($sidebar){
if( is_singular( 'post' ) ){
return 'ups-sidebar-blog-sidebar';
}
return $sidebar;
}
The ups-sidebar-blog-sidebar should be the ID of blog sidebar:

Let us know how it goes!
Ups. I’ve got a problem there because I didn’t activate the child theme. Actually, the web is under production environment and it has a few changes in different sections (css, js…). However, there isn’t any prevision to make more changes because the clients has validated the web, Is there any way to solv this without the child theme or to activate it with a minor workload?
regards
Hi,
In that case, you can just check all your post that is listed on the left box for your sidebar to appear in your posts.

The code provided by my colleague was just to make it easy for you so you wont have to check the posts and will automatically display the sidebar when new post is added.
Thanks
Finally, I 've made the child theme and activateit. Then, I put the code in the functions.php but my sidecbar confoig still without any change. I attaach you a picture of it.
Hi There,
Since your blog sidebar has different ID so the custom code should be:
add_filter( 'ups_sidebar', 'x_single_post_sidebar' );
function x_single_post_sidebar($sidebar){
if( is_singular( 'post' ) ){
return 'ups-sidebar-blogcategories';
}
return $sidebar;
}
Regards!
IT still failing. When I click in any gategory, the sidebar disappears 
You cpould check it here: http://residenciadonperro.com/tablon/
Hi there,
Please update the code to:
add_filter( 'ups_sidebar', 'x_single_post_sidebar' );
function x_single_post_sidebar($sidebar){
if( is_singular( 'post' ) || is_category() ){
return 'ups-sidebar-blogcategories';
}
Hope this helps.
Now it works fine!!! Thnk!!!
You’re welcome! 
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.