meta-box-yoast-seo

Support General meta-box-yoast-seo

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6647
    SaschaKoethSaschaKoeth
    Participant

    Hi,

    as I´m a "no-coder" I have no idea where to put this:

    'add_to_wpseo_analysis' => true to the fields’

    ...to activate the yoast functionality.

    Please help!

    Thanks

    Sascha

    #6653
    Truong GiangTruong Giang
    Participant

    Hi there,

    You can add it to field config array which you want to use Yoast Seo functionality:

    
        $meta_boxes[] = array(
            'title'      => __( 'Test Meta Box', 'textdomain' ),
            'post_types' => 'post',
            'fields'     => array(
                array(
                    'id'   => 'name',
                    'name' => __( 'Name', 'textdomain' ),
                    'type' => 'text',
                    'add_to_wpseo_analysis' => true,
                ),
                array(
                    'id'      => 'gender',
                    'name'    => __( 'Gender', 'textdomain' ),
                    'type'    => 'radio',
                    'options' => array(
                        'm' => __( 'Male', 'textdomain' ),
                        'f' => __( 'Female', 'textdomain' ),
                    ),
                ),
                array(
                    'id'   => 'email',
                    'name' => __( 'Email', 'textdomain' ),
                    'type' => 'email',
                ),
                array(
                    'id'   => 'bio',
                    'name' => __( 'Biography', 'textdomain' ),
                    'type' => 'textarea',
                ),
            ),
        );
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.