Update on July 05, 2019: Since v 3.3.10 of SEOPress that was released on 23/02/2019, the following is no longer required.


With the current incredible deal of $99 for unlimited lifetime usage of SEOPress Pro, many in the WordPress community (at least in the 10 or so Facebook groups that I hang around in) including me are jumping ship from Yoast.

Both Yoast and SEOPress have the feature of content analysis wherein you get to see how effectively your focus keyword has been used in the content with the corresponding suggestions to improve the onsite SEO score.

One issue is that only the content present in the WordPress editor is set to be read and parsed by these SEO plugins.

This means that on a site running Oxygen any content that is coming from the Oxygen editor will not be taken into consideration during the content analysis.

While Oxygen has built-in integration for Yoast to tackle this, it does not currently have something similar for SEOPress.

Thankfully, SEOPress provides a filter that lets us add any custom content to the WordPress content for it to analyze.

Let’s see how we can use this filter hook to instruct SEOPress to also parse the content in Oxygen editor.

Step 1

Install and activate Code Snippets plugin.

Step 2

Go to Snippets > Add New.

Title: Add Oxygen Builder’s Content to SEOPress’ analysis

Code:

add_filter( 'seopress_content_analysis_content', 'sp_content_analysis_content', 10, 2 );
/**
 * Filter the analyzed content to add content from Oxygen editor.
 * @param  string $content Current content in the WordPress editor.
 * @param  int $id      ID of the current entry.
 * @return string          Modified content.
 */
function sp_content_analysis_content( $content, $id ) {

    // HTML of Oxygen's content.
    $cf = do_shortcode( get_post_meta( $id, 'ct_builder_shortcodes', true ) );

    return $content . $cf;

}

Set it to run only in the admin.

That’s it!

Credit: Jan Raap.

Reference: https://wordpress.org/support/topic/it-doesnt-recognize-oxygen-texts/

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
  • If I add just this code, through the snippets…will this get all the text in all the text blocks & rich text blocks ? Is this setup global – so it applies to all the pages and it’s content ?

    Thx

  • Hi can this be modded to populate the “Meta description” description field with the page content? Like it would if the WP Editor were used.

    Thanks.

    • Never heard of it.

      Have you contacted them and asked if it has a filter hook to add another piece of content besides the post content in its analysis?

  • magnifiercross
    >
    linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
    %d bloggers like this: