• Thanks for this good start! It’s very simple, but it does get my fields into the Yoast SEO analysis box.

    My problem is that it doesn’t parse image fields and it doesn’t include any heading tags that might be in the template when the fields are used, so the analysis is still quite incomplete. I get notices during analysis like “No subheading tags (like an H2) appear in the copy.” and “No images appear in this page, consider adding some as appropriate.” which is not true, it’s just that I’m adding those as custom fields.

    It would be great if we could somehow add the tags into the content to be analyzed. Barring that, I think I’m going to use some kind of HTML DOM Parser and overwrite the post content.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ryuhei Yokokawa

    (@ryuheixys)

    Thanks for the review!
    I agree completely with you. When I initially started working on this plugin, I intended to get the entire document as a HTTP request. That turned really bad when I found out that it would run 4 times during a page edit load. So, I would like to accomplish it in that way, but it just wasn’t very feasible (also considering that not everyone has a fast server).

    I’m hoping that I can figure out a more robust way to solve this issue soon using requests/internal page rendering.

    Thread Starter Dalton Rooney

    (@daltonrooney)

    I’ve been playing with this a bit today and I’ve come up with a fairly simple solution. I don’t use the_content() on my sites at all, so I used wp_remote_get() and simplehtmldom.php to parse the content of my rendered template (with all of my repeaters, flexible fields, etc) and then write that HTML into the post_content field.

    https://gist.github.com/daltonrooney/1a4e25165a3cb41fd60f

    If you did use the_content() but still wanted to supplement with ACF fields, you could write this to a post meta field, and then append that field to the_content with the wpseo_pre_analysis_post_content filter instead.

    If there’s a filter that could specify that a certain field will be in an <h1>, I would use that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Good start!’ is closed to new replies.