• Resolved sameedalam

    (@sameedalam)


    I want to modify my wp_head. I am using the Yoast plugin I want to add a new custom meta tag after the description meta tag. I try this code for add keyword tag but it’s not shown after the description tag its shown in a lower position this code

        /*Display custom meta keywords or the post excerpt */
    function add_custom_meta_key(){
    
    #Single Page Meta Description
    if( is_single() ){
        $key = get_post_meta( get_the_id(), 'keywords', true);
        if( ! empty( $key )  ){
            $meta_key = esc_html($key);
            echo '<meta name="keywords" content="' . $meta_key . '" />';
        }
    }}
    add_action( 'wpseo_head', 'add_custom_meta_key', 2 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello Sameedalam,

    Thanks for reaching out regarding changing the output of the wp_head. Unfortunately, I am unable to review your custom code as this is outside the scope of the support we provide here. However, you or your developer are free to customize the plugin to your needs. I’ll only advise trying your custom solutions first on a staging site.

    Plugin Support Maybellyne

    (@maybellyne)

    This thread has been marked as resolved due to a lack of activity.

    You’re always welcome to re-open this topic. Please read this post before opening a new request.

    Thanks for understanding!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use Yoast Filter to modify value of wp_head output?’ is closed to new replies.