Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
function set_canonical() {
if ( is_single() ) {
global $wp_query;
echo '<link rel="canonical" href="'.get_permalink($wp_query->post->ID).'"/>';
}
}
add_action('wp_head', 'set_canonical');
function set_canonical() {
global $fpdb;
$q =& $fpdb->getQuery();
if ($q->params->entry) { //is single
list($id, $e) = @$q->peekEntry();
if ($e) echo '<link rel="canonical" href="'.get_permalink($id).'"/>';
}
}
add_action('wp_head', 'set_canonical');
Posted By: luganothis plugin canonical not working in flatpress.
1 to 5 of 5