Change meta tags programatically
I think you need to do the add_action( ‘wp_head’, ‘add_meta_tags’ , 10 ); in your functions.php instead of the template to get the function called. And it adds it then everywhere where you have wp_head(). So if you want to only call it content-share.php you need some conditioning logic like if (is_page_template(‘page-templates/content-share.php’)) { add_action( ‘wp_head’, … Read more