How to edit classes in body tag?

try this //*** make Services full col ***/ add_filter( ‘body_class’, ‘custom_post_full_width’, 999, 2 ); function custom_post_full_width( $wp_classes, $class ) { if ( is_post_type_archive(‘services’) OR is_singular(‘services’) ) { // List of the only WP generated classes that are not allowed $blacklist = array(‘two-col-right’, ‘two-col-right-1080’); // Blacklist result $wp_classes = array_diff( $wp_classes, $blacklist ); // Extra classes … Read more

Getting commenter meta

As per the comments above, you can’t have this functionality directly. So we need to add this functionality as per the steps given below. Add the gender field in the comment form. Save the gender as meta data of that comment. Change the get avatar functionality of the comment to pass the default url as … Read more

Some questions about how proper add 2 CSS file in a WordPress theme?

It seems like you’re using dependencies the opposite way of how they should be used. In the WordPress Codex, they try to explain how it’s supposed to be used. $deps (array) (optional) Array of handles of any stylesheets that this stylesheet depends on. Dependent stylesheets will be loaded before this stylesheet. Since your style2.css is … Read more

Function shortcode – Set Parameter

There is a basic shortcode example in the Codex. function bartag_func( $atts ) { extract( shortcode_atts( array( ‘foo’ => ‘no foo’, ‘baz’ => ‘default baz’ ), $atts ) ); return “foo = {$foo}”; } add_shortcode( ‘bartag’, ‘bartag_func’ ); The array is the shortcode defaults and is used to fill in for any attribute that isn’t … Read more