Skip to content

Instantly share code, notes, and snippets.

@kodie
Created September 11, 2015 18:10
Show Gist options
  • Save kodie/2698baaa6d7daf96b9f8 to your computer and use it in GitHub Desktop.
Save kodie/2698baaa6d7daf96b9f8 to your computer and use it in GitHub Desktop.
is_page function in jQuery for Wordpress
function is_page($pageid) {
if (jQuery('body').hasClass('page-id-'+$pageid)) { return true; } else { return false; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment