Some fixes
-
The current code has a debug Warning from WordPress by the way jquery is being enqueued. I’ve modified the code for the warning to go away, to include https links and to fix a syntax error on the
get_bloginfo
line:function make_me_links_js() { wp_enqueue_script('jquery'); echo '<script> jQuery(document).ready(function(){ jQuery(".entry-content a[href^=\'https://\']").attr("target","_blank"); jQuery(".entry-content a[href^=\'https://\']").attr("target","_blank"); jQuery(".entry-content a[href^=\'' . get_bloginfo("url") . '\']").attr("target","_self"); }); </script>'; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Some fixes’ is closed to new replies.