Tag Info

New answers tagged

0

I used: function hide_yoastseo() { if ( !current_user_can( 'administrator' ) ) : remove_action('admin_bar_menu', 'wpseo_admin_bar_menu',95); remove_menu_page('wpseo_dashboard'); endif; } add_action( 'admin_init', 'hide_yoastseo'); ... but then the media library in grid view did not load and I could not add a featured image. Then I changed ...


0

Use the wpseo_opengraph_title filter: function wpse_187763_wpseo_opengraph_title( $title ) { if ( is_singular() && $post = get_queried_object() ) { if ( $_title = get_post_meta( $post->ID, 'custom_field_key', true ) ) $title = $_title; // Override title with custom meta title } return $title; } add_filter( ...


0

Yoast Support kindly provided me with the following reference: https://yoast.com/wordpress/plugins/seo/api/ Using the following filters calling my own functions, I was able to change everything in the header based on dynamic content. add_filter('wpseo_title', 'setPageTitle', 10); add_filter('wpseo_metadesc', 'setMetaDesc', 10); ...



Top 50 recent answers are included