Ultimate FB Conflict with mission critical SEO plugin

Yo @Vladislav,

I frequently work with an SEO firm that makes pretty extensive use of local search optimization in Google - and the main plugin that makes it easy for them is this one:

I haven't dug into who is stomping on who but if both are enabled at the same time, the SEO plugin's map & contact data is rendered twice - once above the body and again in the right place via shortcode.

Anyhow, I thought you might be able to check it out since I haven't seen a plugin freak out quite like that in a while.

Thanks man, I know you are under a ton of pressure with all the projects right now. If I figure out the conflict first I'll let you know.

  • Vladislav


    Thanks for the detailed info, it helped a lot with determining what's going wrong. As it turned out, the Local Search plugin echoes out the generated shortcode content instead of returning it for replacement (it does that at the very end, so it could be something they really need - I haven't tested extensively the repercussions of replacing echo with return in their code). This gets triggered by our content parsing for OpenGraph image detection, so the output gets out twice - once in the head and once where it should be shown.

    There are a few ways we can prevent that from happening. Probably the easiest and least involved one would be to set "Always use this image" setting in Ultimate Facebook OpenGraph settings - this takes absolute precedence and will make sure the shortcode doesn't get triggered. If this is not possible or desired, another option might be to add featured images to the posts/pages where this shortcode is being used, if possible. This will also take precedence over content parsing for images and prevent the content filtering from being triggered. Lastly, a bit more involved option would be to use the attached Beta and add a define like this to your code (wp-config.php, a mu-plugin or at the beginning of functions.php):


    This will prevent the content filters from being applied against the post content when we search it for the possible images. This is a code-level approach, but might be the cleanest as it doesn't require you to change OpenGraph settings or interfere with your content.