• Resolved dgomezm

    (@dgomezm)


    Hello everyone,

    I’d like to propose an enhancement or a manual configuration option for the “AI For SEO” WordPress plugin to improve its compatibility with shortcodes. Currently, the plugin appears to overlook shortcodes within post content, which limits its effectiveness for those of us using automated websites or dynamically generated content.

    After some investigation, I’ve found that a simple modification to the plugin’s PHP code seems to resolve this issue. By changing the following line:

    PHP

    // Get post-content
    $post_content = $post->post_content;
    

    To this:

    PHP

    // Get post-content
    $post_content = do_shortcode($post->post_content);
    

    I’ve personally implemented this change on my own plugin installation, and it works flawlessly. The plugin is now able to analyze and optimize content generated by shortcodes without any problems.

    I understand that directly modifying the plugin’s code isn’t a practical solution for everyone. Therefore, I suggest considering one of the following options:

    • Implement the proposed change by default: This would enable the plugin to work seamlessly with shortcodes out of the box.
    • Add a configuration setting: Include a checkbox or toggle in the plugin’s settings to allow users to enable or disable shortcode processing.

    I believe this improvement would significantly enhance the plugin’s versatility and make it more valuable to a broader user base.

    Thank you for your time and consideration.

    Best regards,

    Daniel

Viewing 1 replies (of 1 total)
  • Plugin Author Space Codes

    (@spacecodes)

    Hi Daniel,

    Thanks a lot for the thoughtful suggestion and detailed explanation!

    You’re absolutely right — handling dynamic content through shortcodes is crucial, especially for automated sites. Great news: as of version 2.0.1, we’ve actually implemented this exact enhancement! The plugin now uses do_shortcode() when parsing post content, so shortcodes are fully respected during AI generation.

    You can safely remove your manual modification and update to the latest version of AI for SEO. The change is now baked in and should work out of the box.

    We really appreciate contributions like yours — they help make the plugin better for everyone. Feel free to reach out if you have any further ideas or feedback!

    Best regards
    Andre from AI for SEO

Viewing 1 replies (of 1 total)

The topic ‘Small tip for future updates’ is closed to new replies.