Yoast and Meta box clone-able groups
Support › MB Yoast SEO Integration › Yoast and Meta box clone-able groupsResolved
- This topic has 7 replies, 2 voices, and was last updated 4 years, 9 months ago by
Long Nguyen.
-
AuthorPosts
-
July 17, 2020 at 2:52 AM #20815
rubbergumball
ParticipantHello,
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.Any ideas?
Thanks.
July 17, 2020 at 10:47 AM #20820rubbergumball
ParticipantSecond 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.
July 17, 2020 at 10:54 AM #20821rubbergumball
ParticipantUPDATE: 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.
July 17, 2020 at 4:58 PM #20826Long Nguyen
ModeratorHi Rubber,
Because the field
group
is very complicated so, at this time, the extension only works with the single group and cloneable fieldwysiwyg
to count all text.I also take a note for the developer team to research for this case.
July 18, 2020 at 7:29 AM #20836rubbergumball
ParticipantIn 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.July 18, 2020 at 9:37 AM #20841Long Nguyen
ModeratorHi,
The Yoast SEO counts the text in the cloneable
wysiswyg
field and other fields liketext
,textarea
as well. See my screen record https://www.loom.com/share/bcd53c981cf542f48ff99bdbffb46a5f. Have you added the settingadd_to_wpseo_analysis => 1
for all fields?July 18, 2020 at 10:49 AM #20844rubbergumball
ParticipantHi Long,
Yes, I had addedadd_to_wpseo_analysis => 1
to thetext
andwysiswyg
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.
July 18, 2020 at 3:43 PM #20846Long Nguyen
ModeratorHi,
As I mentioned above, Yoast does not count text in the cloneable group (only first group). If you create more fields like
text
,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. -
AuthorPosts
- You must be logged in to reply to this topic.