I can’t seem to successfully remove the body classes added by this plugin. Can someone help me out? How can I use the ‘disable_wvs_body_class’ filter to remove all ‘wvs’ body classes, on all pages?
Thanks in advance!
]]>
[01-Feb-2022 17:46:03 UTC] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/customer/www/staging23.example.com/public_html/wp-content/themes/astra/inc/markup-extras.php:82
Stack trace:
#0 /home/customer/www/staging23.example.com/public_html/wp-includes/class-wp-hook.php(309): astra_body_classes('')
#1 /home/customer/www/staging23.example.com/public_html/wp-includes/plugin.php(189): WP_Hook->apply_filters('', Array)
#2 /home/customer/www/staging23.example.com/public_html/wp-includes/post-template.php(836): apply_filters('body_class', Array, Array)
#3 /home/customer/www/staging23.example.com/public_html/wp-includes/post-template.php(595): get_body_class(Array)
#4 /home/customer/www/staging23.example.com/public_html/wp-content/themes/fast/header.php(160): body_class()
#5 /home/customer/www/staging23.example.com/public_html/wp-includes/template.php(770): require_once('/home/customer/...')
#6 /home/customer/www/staging23.example.com/public_html/wp-includes/template.php(71 in /home/customer/www/staging23.example.com/public_html/wp-content/themes/astra/inc/markup-extras.php on line 82
If we comment out line number 52 in /wp-content/plugins/tutors/classes/Assets.php the error goes away and the website shows properly.
add_filter( 'body_class', array( $this, 'add_identifier_class_to_body' ) );
Can you please help.
]]>Is this a normal thing and is there a way to fix this?
Thank you
]]>
add_filter( 'template_include', 'custom_template');
function custom_template( $template ) {
if ( is_page( 66 ) ) {
$template = get_query_template( 'template-test' );
}
return $template;
}
Everything work fine outside the fact I dont get the class “page-template-template-test.php” in the body class. I instead get “page-template-default”
From what I understand, template_include is called after the body tag so body_class dosent get to work with the new template. Is it normal?
Am I using the function properly?
Thank
]]>add_filter( 'body_class', 'my_class_names' );
function my_class_names( $classes ) {
// add 'class-name' to the $classes array
$classes[] = 'casfassafasd';
// return the $classes array
return $classes;
}
]]>on category page i dont’t get .mansory class is on <body>
where come from this class?
Who can give me some little help?
How get .masonry class on body category page?
I see <?php body_class(); ?> in header.php
Best regards
]]><body <?php body_class(); ?>>
It is not coming from a plug-in, tried to disable them all.
the <script> look like this
<div class="wntgbvcfqhh">dtdzel, kjlasksdjj, } if etc. </script>;
How can i remove this?
]]>add_filter('body_class', 'remove_a_body_class', 10, 2);
function remove_a_body_class($wp_classes) {
if( is_page_template('vulcan-page.php') ) :
foreach($wp_classes as $key => $value) {
if ($value == 'full-width') unset($wp_classes[$key]);
}
endif;
return $wp_classes;
}
Site: https://angelxray.com
The page in question: Vulcans are rather weird
However, it does not work; I assume I am doing something wrong but I cannot find it. Any help would be most gratefully appreciated!
]]>I would like to add the Project tags to the body_class so I can do fancy stuff
I am trying to work with this snippet, and adapt it to the Project Tags but I am not having any luck:
function add_category_name($classes = '') {
if(is_single()) {
$category = get_the_category();
$classes[] = 'category-'.$category[0]->slug;
}
return $classes;
}
add_filter('body_class','add_category_name');
Any help would be greatly appreciated.
https://www.ads-software.com/plugins/jetpack/
]]>Types is using the default page layout.
I need to use the landing page layout.
How can I tell Types posts to do this?
Thank you,
Chris
https://www.ads-software.com/plugins/types/
]]>