Yoast SEO and Custom fields metabox

Support General Yoast SEO and Custom fields metaboxResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31653
    EliodataEliodata
    Participant

    Hi,

    I tried following this post:
    https://metabox.io/add-custom-fields-to-yoast-seo-meta-tags/

    But the meta description seems to stay empty. As you can see here:
    https://metatags.io/

    With this page:
    https://formationstrategique.fr/formation/habilitation-electrique-electricien-b1v-b2v-br-bc-be-essais-verification-mesurage/

    Can you help lpease?

    Best regards

    #31667
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Can you please share the code that you use to create the custom field? I've tested that feature again and it works as well on my end. For example:

    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    function your_prefix_function_name( $meta_boxes ) {
        $meta_boxes[] = [
            'title'  => __( 'Post Meta', 'your-text-domain' ),
            'id'     => 'post-meta',
            'fields' => [
                [
                    'name'                  => __( 'Wysiwyg', 'your-text-domain' ),
                    'id'                    => $prefix . 'wysiwyg',
                    'type'                  => 'wysiwyg',
                    'add_to_wpseo_analysis' => true,
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    Then add the code to the Yoast SEO settings %%cf_wysiwyg%%
    screenshot: https://share.getcloudapp.com/8Lu9nDYo

    #31713
    EliodataEliodata
    Participant

    Thank you for the kind help.
    Custom fields have been created with the builder and works great on my product pages.
    But I will find another solution for Yoast SEO.
    Best regards

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.