Skip Navigation

[Resolved] Yoast issue (The text contains 0 words.) Please advice.

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wants to Allow Yoast to recognize custom fields.

Solution:

What I recommend that you do is to contact the yoast support forum in order for them to help you achieve this.

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#923503

I am trying to:

Hello, I would like to ask you for advice how to set up the YOAST Plugin to recognize my custom fields.
I have read a couple of threads in the forum but could't find a solution of this fix.
Tried to import this snippet of code in my functions.php with using the slugs of my custom fields as suggested but it still didnt work:

function yst_custom_content_analysis( $content ) {

global $post;

/** return $content . ' ' . get_post_meta( $post->ID, 'book-description', true ); */

return $content . ' ' . get_post_meta( $post->ID, 'wpcf-book-description', true );

}

add_filter( 'wpseo_pre_analysis_post_content', 'yst_custom_content_analysis' );

Can you please advice me if there is a way of connecting the YOAST to my custom post fields so it recognize it.
Thank you. Best Regards.

Link to a page where the issue can be seen:
hidden link

#923657

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Terry,

Thank you for contacting our support forum.

I dont think our forum is the best place to get assistance with this.

What I recommend that you do is to contact the yoast support forum in order for them to help you achieve this.

Thanks,
Shane

#923752

Hi Shane
Thanks for getting back to me on this.

Although I understand that its more of a YOAST issue as opposed to a toolset issue can you let me know if the content in post types from toolset is indexable. Its one thing if Yoast can't see the content but another if Google can't see it.

Thanks
Terry

#923763

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Terry,

Yes this is because the custom fields are declared public so they are indexible. You code should return information in the field.

Thanks,
Shane