Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Compatibility with Yoast SEO #46

Open
bhubbard opened this issue Jan 30, 2016 · 2 comments
Open

Better Compatibility with Yoast SEO #46

bhubbard opened this issue Jan 30, 2016 · 2 comments

Comments

@bhubbard
Copy link
Contributor

Currently the plugin creates a CPT called idx_page. When you enable the Yoast SEO Sitemaps, it generates a 404 for this CPT. The plugin should disable check for yoast and disable sitemaps for this custom post type, or update the sitemap to use the idx page urls.

Also it should disable the xml sitemaps for wrappers, and use the yoast settings to noindex all the wrapper pages. Maybe provider better default title and meta descriptions as well.

csjoblom pushed a commit that referenced this issue Feb 8, 2016
…64 to release/2.0.2

* commit '65ea02e46240ea99542ca0d1a465b53e89df91eb':
  Add New Window option for all IMPress widgets and shortcodes besides the omnibar.
@amcn84
Copy link

amcn84 commented Feb 15, 2016

The wrappers are already including:
meta name='robots' content='noindex,follow'

This issue seems to rely more on Yoast than IMPress though I would agree we have a large number of users who use Yoast we also have a large number that don't. To eliminate adding dependency to this plugin we should just find an SEO standard to apply to the wrapper pages in general and contact Yoast to add CPT support to remove the features we don't want applied.

@bhubbard
Copy link
Contributor Author

There really is nothing Yoast should need to do to his plugin. He offers filters to remove or update the SEO settings to any CPT. Here is an example to update the default options for a CPT. The example of code I use here is for any site using a CPT called testimonial:

$yoast_titles = get_option('wpseo_titles');

$yoast_titles['title-ptarchive-testimonial'] = '%%pt_plural%% %%page%% %%sep%% %%sitename%%';
$yoast_titles['metadesc-ptarchive-testimonial'] = 'Check out all these great %%pt_plural%% for %%sitename%%.';

update_option('wpseo_titles', $yoast_titles);

Simply creating a file in IMPress it would check if Yoast SEO is installed and activated. If it is then it could run similar code to above to optimize/set the SEO settings for the idx_page CPT, wrappers, etc.

We should be looking to do this for other popular plugins as well. Here are some gists I have created and have been using similarly.

Jetpack Sharing
https://gist.github.com/bhubbard/11b863a43f412e8b68e0

Custom class names for Wrappers
https://gist.github.com/bhubbard/3ba8f9cf5bb1b43b5773

Hide AdminBar / Debug Bar/ Comment JS for Wrappers
https://gist.github.com/bhubbard/ed5bca848b48804749cf

Print Styles CSS Tag for Wrappers
https://gist.github.com/bhubbard/7740935a11ab19f0524c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants