Blog

Posts tagged with "PHP"

How to remove content WordPress adds to header and footer

This snippet will remove ALL the code WordPress adds to the head and foot of your code, such as styles, scripts and other meta tags.

Just add the code below to ...

see full post
tags:

How to remove parts of the WordPress admin Header

Add the snippet below to your themes functions.php file to remove parts of the WordPress admin Header

function remove_admin_bar_links() {     global $wp_admin_bar;     $wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo ...

see full post
tags:

How to remove the help tabs in WordPress Admin

Add the snippet below to your themes functions.php file remove the help tabs in WordPress Admin.

function remove_help_tabs() {     $screen = get_current_screen(); $screen->remove_help_tabs(); } add_action('admin_head', 'remove_help_tabs');

see full post
tags:

How to close any open tags in a PHP string

Use the snippet below to close any open tags in a PHP string.

function closetags($html) {     preg_match_all('#<(?!meta|img|br|hr|input\b)\b([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);     $openedtags = $result[1];     preg_match_all('#</([a-z]+)>#iU', $html, ...

see full post
tags:

How to change the WordPress admin footer text

Add the snippet below to your themes functions.php file to change the WordPress admin footer text.

if (! function_exists('dashboard_footer') ){     function dashboard_footer () {         echo 'YOURTEXT'; ...

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