The All in One SEO Pack plugin for Wordpress provides a simple means for implementing an SEO strategy for your blog. However, the current version of the plugin does not integrate well with the WP Remix theme due to it’s inability to strip the various shortcodes used by the theme from the generated meta tags.
After making the changes described below my page results within the Google search results have been fixed as shown below.
The current version (1.4.6.16) of the well-known All in One SEO Pack plugin does not properly strip the various shortcodes used by the Wordpress editor and the WP Remix theme prior to generating the meta description field. This description field is then displayed in search engine results as shown below. This not only makes it difficult for the reader to determine what the link is for but it also affects your SEO strategy as crawlers and spiders will mis-interpret the text results.
To resolve this issue, one must manually modify the All in One SEO Pack plugin code to force it to strip out the various shortcodes prior to generating this information. This can be accomplished by following the steps below.
// Replace this...
$text = str_replace(']]>', ']]>', $text);
// With this...
$text = str_replace(array(']]>', '[REMIX]', '[/REMIX]'),
array(']]>', '', ''),
$text);
$text = preg_replace('|\[(.+?)\](.+?\[/\\1\])?|s',
'',
$text );
// Replace this...
$text = str_replace(']]>', ']]>', $text);
// With this...
$text = str_replace(array(']]>', '[REMIX]', '[/REMIX]'),
array(']]>', '', ''),
$text);
$text = preg_replace('|\[(.+?)\](.+?\[/\\1\])?|s',
'',
$text );
I have contacted the developer of the All in One SEO Pack plugin to request that support for the WP Remix theme be integrated into the next release of the plugin. I have also informed the developer of the WP Remix theme of this issue.
Interessting, I didn’t know that.
Does this bug occur with every wpremix installation? Do you know if the “Platinum SEO plugin” also have a problem with wpremix (I think they are similar)?
Thanks
Eddie
Eddie – Yes, this bug will occur with every WP Remix installation as it is related to the design of the All in One SEO Pack plugin and not the WP Remix theme itself. I have not tried the Platinum SEO plugin but my guess is that this plugin will exhibit similar behavior.
Thank you Keith!
I just checked, the “Platinum SEO plugin” has the exact code snippets as you described above. Do you think I should replace them as well with the code you suggest?
Eddie – Yes, if you plan to use the WP Remix theme then I would suggest making these modifications to the Platinum SEO plugin. You can verify the issue is occurring by viewing the source code for your generated web pages. Look for the tag near the top of the file.
Good find and even better: Good work on fixing this issue. I just discovered this on a site I’m setting up for my self on a local machine and was about to post an issue on this on the remix forums.
GREAT work my friend!
XepoX – Glad I could help!
Thanks again, great work!
I will make the changes then.
Surprisingly enough the meta tags are fine here, no strange code.
Maybe it’s because my wpremix runs on a local machine with xampp.
Eddie
Eddie – Did you check the meta tags for a page or a post? The posts are most likely unaffected by this as they do not directly contain the shortcodes. However, the pages within a site using the WP Remix theme do directly contain the shortcodes (brought in from the use of the various WP Remix templates) which leads to the problem discussed here. However, without this fix your posts will be affected by other shortcodes embedded within the posts.
You’re right. The problem persists only with pages, which I’ve created with the remix editor.
There wasn’t a problem with pages that I’ve created before wpremix.
I will make your suggested changes.
Should I inform the developer of the platinum plugin?
Eddie – Yes, I would suggest informing the developer of the Platinum SEO plugin about this issue. Please refer him back to my post if you would.
I’ve described the problem to the developer and also linked back to your article, here is his response:
Eddie – I understand the developer’s concerns. The only reason I added the lines specifically for the “remix” tag is because I am not well versed in regular expressions. What truly needs to happen is the “remix” tag and all other associated content wrapper tags need to be be stripped from the content (yet the content between the tags needs to remain intact). Then the second regular expression search strips the rest of the shortcodes (tags and inclusive content) from the overall page / post content prior to creating the meta description. I will see if I can find some regex code that can do this. If the developer has any further questions about this please tell him to contact me directly.
Hi
I have been building a site in the last week using the WPremix template and on each page I have been using the all in one SEO pack and it has worked perfectly for me.
When I type the url of my home page into the google search bok it displays the page title and exactly what I typed into the text description box.
Cheers
Rob B…
Rob – Please read the previous comments so that you may better understand this issue. The issue occurs when you perform use the “Send to Editor” feature of the WP Remix theme to send a template to the editor window. If this template contains any shortcodes or PHP code near the top of the template (i.e. before you first section of text) you will encounter the issue. The only reason that I can think of as to why you are not encountering this issue is that you are not using the “Autogenerate Descriptions” feature of the All in One SEO pack plugin and are instead creating your own excerpts. Either way, I am glad to hear that it is working correctly for you. Will you provide a link to your site so that I may verify this?
Hi Keith
Thanks for the reply, I have checked a little more and when you type “The Australian Helicopter Directory” into the google search it works fine. But if I type a sub page it is all messed up like described above.
Check about half way down this page for “Heli Aust”: http://www.google.com/search?hl=en&rlz=1B3GGGL_enAU230AU257&q=Heli+Aust&start=20&sa=N
My site is http://www.helidirectory.com
Cheers
So I followed all of your instructions and replaced the code and uploaded the file.
Am I correct in saying that I need to wait for the site to be crawled again before I see the changes?
Thanks
As you requested: my site is helidirectory.com
This issue has been addressed in the latest version of All in One SEO Pack, 1.4.7. Rob, this is likely the reason you aren’t experiencing this issue.
To address whether or not it happens with Platinum SEO, yes, because the “author” of that plugin just copied the code of All in One SEO Pack six months ago, so all of All in One SEO Pack’s feature updates and bugfixes aren’t in it.
Rob – Yes. You will need to wait till the site is crawled again to see the changes. Mine took about a week or so…
Michael – I was wondering if that was the case. The code looked all too familiar when I reviewed it. It’s too bad that we have people stealing plugins like this. By the way, thanks for making these suggested updates!