Skip to content

Instantly share code, notes, and snippets.

@logichub
Created June 12, 2017 21:05
Show Gist options
  • Save logichub/414bbf1f7c48e0d4c08865edbc1be153 to your computer and use it in GitHub Desktop.
Save logichub/414bbf1f7c48e0d4c08865edbc1be153 to your computer and use it in GitHub Desktop.
<?php
/* Add custom tags in the header */
function lh_add_custom_tag_head() {
if( is_page( array( 1, 2, 3, 4, 5, 6, 7 ) ) ) { //replace these numbers with the ids of your pages ?>
<link href="http://hvsimage.com/canonical/morris-water-maze-mwm/solutions/ " rel="canonical" />
<?php }
}
add_action( 'wp_head', 'lh_add_custom_tag_head' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment