Support › Meta Box for Yoast SEO › Yoast and Meta box clone-able groupsResolved
I've got metaboxes that are groups of clone-able content, text, wysiwyg, etc. - I'm having problems with Yoast getting text count from some pages with multiple 'WYSISYG' fields in a cloned group. If the post has a single group there is no issue and the word count is included in Yoast.
Second Yoast an Meta Box issue - it appears that the std value is 'leaking to other posts besides the specific template the fields are assigned to.
UPDATE: Not related to Yoast. I'll start a new thread.
It appears that the hidden std response is getting added to every post of that same post type- which for me defeats the purpose of grouping content via a std value, unique to that meta box. Would prefer that this happens only on pages with a specific template and not all of a post type, ands should happen behind the scenes instead of requiring an editor to chose a taxonomy term or enter a value into a text field.
Because the field
group is very complicated so, at this time, the extension only works with the single group and cloneable field
wysiwyg to count all text.
I also take a note for the developer team to research for this case.
In my testing I've found that cloneable
wysiswyg fields that are not consecutive in the editor flow will break text count for anything after that inserted non-
wysiwyg field group.
The Yoast SEO counts the text in the cloneable
wysiswyg field and other fields like
textarea as well. See my screen record https://www.loom.com/share/bcd53c981cf542f48ff99bdbffb46a5f. Have you added the setting
add_to_wpseo_analysis => 1 for all fields?
Yes, I had added
add_to_wpseo_analysis => 1 to the
wysiswyg filed groups but the insertion of other field types between them somehow stops the text count for Yoast. Not using AIO, but rather have added these fields in a custom plugin.
array( 'id' => $prefix . 'sections', 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'collapsible' => true, 'fields' => array( array( 'id' => $prefix . 'section_type', 'name' => esc_html__( 'Section Type', 'site' ), 'type' => 'select', 'options' => array( 'wysiwyg' => 'WYSIWYG Editor', 'image_grid' => 'Image Grid', 'quote' => 'Quote Section', 'form_id' => 'Gravity Forms ID' ) ), array( 'id' => $prefix . 'wysiwyg_section', 'name' => esc_html__( 'WYSIWYG Editor', 'site' ), 'type' => 'wysiwyg', 'visible' => array( $prefix . 'section_type', 'wysiwyg' ), 'add_to_wpseo_analysis' => true, ), .... ETC.
As I mentioned above, Yoast does not count text in the cloneable group (only first group). If you create more fields like
textarea in the group, it still counts the text as well.
Here is my code https://pastebin.com/7FQaGwnf
and screen record https://www.loom.com/share/2299374aa2f548f1a17858c3f2dd569c.