Skip to content

Instantly share code, notes, and snippets.

@bpmore
Created June 19, 2014 15:16
Show Gist options
  • Save bpmore/dd1baf8b6ccb9374a167 to your computer and use it in GitHub Desktop.
Save bpmore/dd1baf8b6ccb9374a167 to your computer and use it in GitHub Desktop.
SiteImprove deep linking on Genesis
<?php
/*
Plugin Name: Get Page Id and Site URL
Description: Get the page id for SiteImprove Deep Linking
Version: 1
Author: Mark Heffington
Author URI: http://www.uca.edu/
*/
/*
Inside mu-plugins
Name it whatever you want.
*/
add_action( 'genesis_meta', 'uca_get_page_id_url' );
function uca_get_page_id_url() {
echo '<meta name="PageId" content="'.get_the_ID().'"/>';
echo '<meta name="subsite" value="'.site_url().'"/>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment