Don’t use css, in the post settings just select no sidebar:
http://docs.kadencethemes.com/virtue/#blog_posts
Kadence Themes
Thread Starter
Dddt
(@dddt)
But if I have front end posting and users are submiting posts frontend then I should go and select no sidebar option for every single post?
Or you can add a function, in a child theme add this to your functions.php file:
<`?php add_filter(‘kadence_display_sidebar’, ‘kad_sidebar_on_post’);
function kad_sidebar_on_post($sidebar) {
if (is_single()) {
return false;
}
return $sidebar;
} ?>`
<?php add_filter('kadence_display_sidebar', 'kad_sidebar_on_post');
function kad_sidebar_on_post($sidebar) {
if (is_single()) {
return false;
}
return $sidebar;
} ?>
Thread Starter
Dddt
(@dddt)
Child the function.php is the one that accessible through my wordpress admin panel? The one I can find through theme editor?
If you have a child theme. Have you installed a child theme so your template changes stay when you update?
Kadence Themes
Thread Starter
Dddt
(@dddt)
No, I have not, where from should I install it?
Thread Starter
Dddt
(@dddt)
ooo, I need to create it π , thank u very much!
Thread Starter
Dddt
(@dddt)
so, I have created a child theme, wp-content/themes/virtue-child then xreated a functions.php and now I have the following code in it
<?php add_filter('kadence_display_sidebar', 'kad_sidebar_on_post');
function kad_sidebar_on_post($sidebar) {
if (is_single()) {
return false;
}
return $sidebar;
} ?>
but this did not make the post full width they are in the same width as before, I followed the steps through the link u shared, hope I’ve done everything correct.
thanks
Can you send me a login I’ll take a look.
Ben@kadencethemes.com
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Login to server?
Hopefully not! That’s really discouraged.
*Reads thread*
Kadence Themes? You really do not need a login for this one. That’s a shortcut and you do not want to be responsible for Dddt’s installation that way.
@dddt? Can you provide a link to your site?
Dddt and I have emailed in the past. I don’t have to help as this is about customizing a child theme and I’ve provided the correct code already. It’s an offer. Not a issue that needs to be fixed.
My suggestion was to take a look at your wordpress admin. Not cpanel or any other server login.
Kadence Themes
P.S. Jan if you have a better way for me to look at what he put in the functions file of his child theme I’m all ears.
Kadence Themes