Disable generated schema by the All in One SEO plugin
//Removes AIOSEO generated schema
add_filter( 'aioseo_schema_disable', 'aioseo_disable_schema' );
function aioseo_disable_schema( $disabled ) {
return true;
}
To add code to your header, use this code snippet:
function custom_head_snippet() {
?>
<!-- Custom Snippet in Head -->
<script>
console.log("Snippet inside the <head> tag.");
</script>
<?php
}
add_action('wp_head', 'custom_head_snippet');
To add code to your body, use this code snippet:
function custom_body_snippet() {
?>
<!-- Custom Snippet After <body> -->
<script>
console.log("Snippet right after <body> tag.");
</script>
<?php
}
add_action('wp_body_open', 'custom_body_snippet');
To add code to your footer, use this code snippet:
function custom_footer_snippet(){
?>
<!-- Custom Snippet in Footer -->
<script>
console.log("Snippet after the <footer> tag.");
</script>
<?php
};
add_action('wp_footer', 'custom_footer_snippet');