AyeCode / userswp

Lightweight WordPress User Profile Plugin, provides a front end login form, registration form, edit account form, forgot password, searchable users directory, and user profiles. It can be extended and we provide add-ons to integrate it with WooCommerce, Easy Digital Downloads, Wp Jobs Manager, GeoDirectory, MailChimp, and many other plugins.
https://userswp.io/
GNU General Public License v2.0
66 stars 26 forks source link

Canonical URL for users profile page need to be user's profile URL #717

Closed wpdev10 closed 1 year ago

wpdev10 commented 1 year ago

Currently profile page URL is set as a canonical URL of the user's profile page which we need to set to the individual user's profile URL.

Here is the support ticket with the issue. https://secure.helpscout.net/conversation/2346865183/46873/

sachyya commented 1 year ago

This is fixed in this PR: https://github.com/AyeCode/userswp/pull/718

An issue with the constructor of the UsersWP_Seo class. Since the plugins loaded are saved in alphabetical by WP. Checking UsersWP_Seo::has_yoast() returns false if not called inside plugins_loaded. So called the added filter on the plugins_loaded but other filters are not working.

wpdev10 commented 1 year ago

@sachyya I have modified the code a bit as we need to use the 'get_canonical_url' filter when yoast is not installed this filter will be used to change the canonical URL.