Blog

How to make site link on WordPress admin bar open in new tab

Add the snippet below to your themes functions.php file to make the site name link on the WordPress admin header open in new tab.

function wp_admin_bar_site_link( $wp_admin_bar ) {     $node ...

see full post
tags:

How to remove WordPress front-end admin bar for all users

Add the snippet below to your themes functions.php file to remove the front-end admin bar for all users.

add_filter('show_admin_bar', '__return_false');

see full post
tags:

How to remove the included version of jQuery in WordPress

Add the snippet below to your themes functions.php file to remove the included version of jQuery in WordPress.

function remove_jquery() {     wp_deregister_script('jquery'); } add_action('wp_enqueue_scripts', 'remove_jquery', 999);

see full post
tags:

A better wordpress excerpt

I’ve often needed an excerpt of a different length or an excerpt that allows more HTML tags than the_excerpt() in WordPress allows.

Add the snippet below to your themes functions.php file ...

see full post
tags:

How to get the current page URL using PHP

Use the snippet below to get the current page URL as a PHP string.

function current_page_url() {     $pageURL = 'http';     if( isset($_SERVER["HTTPS"]) ) {         if ($_SERVER["HTTPS"] ...

see full post
tags:

welcome to the eudemonics blog ...

you can find posts about the things i've been working on, useful code snippets and articles relating to my interests.

comments can be left at the bottom of each post, if you wish to contribute to an article please get in touch.

Blog Categories

Blog Tags