How to Overwrite or Remove Canonical URLs in MPG?

Canonical URLs is the URL of the original page. This is an essential tool of MPG since it creates duplicated pages on different URLs. A canonical URL helps Google know which is the original page, and they are constructed using tags ( rel="canonical").

MPG automatically generates canonical URLs to the generated pages, but it removes the canonical URLs generated elsewhere. If you want to use SEO plugins and create specific canonical URLs with them, this can be done using the filter below.

1

Open the theme editor and the functions.php file (make sure to use a child theme if your theme gets updates as this file get's overwritten with theme updates)

2

Copy the below filter and paste it inside the file.

	add_filter( 'mpg_enable_canonical_url_generate', '__return_false' );

This filter will automatically disable the generated canonical URLs, which are enabled by default.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us