by Nick | Jul 6, 2020 | Code
To enable error logging, create an empty file named “php-errors.log”. Place it in a directory that is not publicly accessible (preferably outside your web root) and ensure it is writable by the web server. Then add the following code to wp-config.php:...
by Nick | Jul 23, 2018 | Code
Use this to remove query strings from static resources in WordPress // Remove query strings from static resources function _remove_script_version( $src ){ $parts = explode( '?ver', $src ); return $parts[0]; } add_filter( 'script_loader_src',...
by Nick | Apr 22, 2017 | Code
Use this SQL to remove all images/documents/etc from your media library 1 – Run these in phpmyadmin DELETE FROM wp_postmeta WHERE post_id IN ( SELECT id FROM wp_posts WHERE post_type = 'attachment' ) ; DELETE FROM wp_posts WHERE post_type = 'attachment' 2...
by Nick | Jan 29, 2017 | Code
Most premium themes ask you to install additional plugins however if you dont install all of the plugins it recommends and keep them activated you will see a warning at the top of the admin area which comes back even if you close it. If you add this code to your...
by Nick | Jan 23, 2017 | Code
Use this to hide menu items in the WordPress admin area that you do not use. <?php function remove_menus_links(){ remove_menu_page( 'edit.php?post_type=portfolio' ); remove_menu_page( 'edit.php?post_type=team' ); remove_menu_page( 'edit.php?post_type=clients' );...
Recent Comments