-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
CRM-19665 WordPress: set canonical URL when using basepage #107
Conversation
agh1
commented
Nov 18, 2016
•
edited by civicrm-builder
Loading
edited by civicrm-builder
- CRM-19665: Canonical URL for WP basepage pages is the basepage itself
commented on JIRA issue https://issues.civicrm.org/jira/browse/CRM-19665 |
|
||
// Yoast SEO has separate way of establishing canonical URL | ||
add_filter( 'wpseo_canonical', array($this, 'basepage_canonical_url' ), 999); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the CRM-19665 I would want to add:
add_filter( 'aioseop_canonical_url', array($this, 'basepage_canonical_url' ), 999);
here,
Likewise commented on Jira. My only observations on the PR itself are minor and somewhat pedantic, but these things tend to build up over time. I'd prefer less idiosyncratic (or perhaps more consistent) use of whitespace, though I recognise that the code styling of this plugin favours CiviCRM's codestyle over that of WordPress. I also note that there's a missing |
Good point about the docblock. I have tested this on WP 4.5.4 and WP 4.6.1 and it solves the problem described. I think we should add All in One SEO support alongside Yoast SEO support. Commented with the code we would need to add. One added benefit of using the Yoast and AIOSEO filters is that they also work on WP versions prior to 4.5 |
…t for All in One SEO plugin
CRM-19665 WordPress: set canonical URL when using basepage Add suppo…
Revert "CRM-19665 WordPress: set canonical URL when using basepage Add suppo…"
Those recent changes can be ignored--@kcristiano made a PR against the branch that I didn't see till today, and I merged it not remembering that the change was already included. |
I commented here: https://issues.civicrm.org/jira/browse/CRM-19665 Tested again against current master branches, works propoerly. Tested with Yoast SEO, AIOSEO and with no SEO plugin. Works in all conditions. I consider this a bug fix, and would like to see this patch included with 4.7.17 |
@eileenmcnaughton since you have been watching this repo lately, can you take a look at this? It's ready to merge, having this in the next release (4.7.18) would be great. Thanks |