Canonical URLs without using a WordPress Plugin
Below is the code that you need to add within the head of your theme template:
<link rel="canonical" href="https://www.kiwideas.com<?php echo $_SERVER['REQUEST_URI'];?>">
You need to replace kiwideas.com with your domain.
Adding canonical Links in WordPress
Below are a few easy steps that have you up and running with WordPress canonical URLS in no time at all, and without a plugin.
Login to WordPress
Hover over Appearance
Find Theme Header (header.php)
Add the Universal PHP Code for Canonical URLS found above within the HEAD section of your theme header file.
Universal PHP Code for Canonical URLS
Other example for experts
$link = str_replace('content/', '', $_SERVER['REQUEST_URI']);
$linkstring = str_replace(' ','',$link );
<link rel="canonical" href="https://recetas1.com<?php echo $linkstring;?>">