Custom Fields
Re-Envisioned
Support General meta-box-yoast-seo

  • Creator
    Topic
  • #6647
    SaschaKoeth
    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

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #6653
    Truong 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 1 replies (of 1 total)
  • You must be logged in to reply to this topic.