Site logo

[Resolved] Yoast settings in Elements page

Home Forums Support [Resolved] Yoast settings in Elements page

Home Forums Support Yoast settings in Elements page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2492533
    Kostas

    hi,
    i have a hero section built using the Elements.
    Yoast settings are not appearing there. Also there is no option to enable it through Yoast Search appearance screen.

    Do you know some tweak to enable Yoast settings in the Elements page?

    #2492817
    David
    Staff
    Customer Support

    Hi there,

    Yoast will only appear on Publicly Queryable Post types, which GP Elements are not.
    You can make them so with snippet.

    add_action('register_post_type_args', function ($args, $postType) {
        if ($postType !== 'gp_elements'){
            return $args;
        }
    
        $args['public'] = true;
    
        return $args;
    }, 99, 2);

    Then you will be able to enable Elements post type in the Yoast Settings.

    Not sure what repercussions could be for making them public, as they may show up in feeds….

    #2493270
    Kostas

    yep it worked thanks 🙂

    #2493273
    Kostas

    solved

    #2494001
    David
    Staff
    Customer Support

    Glad to hear that

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