Skip to content

Instantly share code, notes, and snippets.

@gMagicScott
Last active January 7, 2017 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gMagicScott/68536f1063a64ff5583b9dbea96c0ffb to your computer and use it in GitHub Desktop.
Save gMagicScott/68536f1063a64ff5583b9dbea96c0ffb to your computer and use it in GitHub Desktop.
<?php
//* Do NOT include the opening php tag
//* Add JS to allow elements to be faux anchors
add_action( 'wp_footer', 'bg_script_clickable' );
function bg_script_clickable() {
echo '<script type="text/javascript">jQuery(document).ready(function($){$(".content .entry").click(function(){window.open($("a",this).attr("href"), "_blank");});});</script>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment