/*
Adds classes to the body tag.
uses body_class() filter
*/
function textdomain_body_classes( $classes ) {
$classes[] = 'class_name other_classname';
return $classes;
}
add_filter( 'body_class', 'textdomain_body_classes' );
/*Add content to head */
function add_to_head() {
include_once 'metadata.php';
}
add_action( 'wp_head', 'add_to_head' );
/* Add to Footer */
function add_to_footer() {
include_once 'footer_data.php';
}
add_action( 'wp_footer', 'add_to_footer' );
WordPress 6.0 Add content to full site editor in the header, footer, and body class since you don't have access to index.php, page.php or single.php file.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.