Home

Welcome to WP Freelance, the best collection of WordPress code, guides and information to make awesome WordPress sites, especially for freelancers.


Latest posts

WooCommerce Update Checklist

WooCommerce is a powerful but complex system, and larger installations often have some additional plugins or custmisations. After updating the WooCommerce plugin, or any other related plugins, it’s important to test your store to ensure everything works as expected and any bugs are identified and fixed. Here’s a handy list to help get your store…

Continue Reading WooCommerce Update Checklist

How to Disable WordPress PHP Error Messages

Sometimes even with the WP_DEBUG setting set to false you will see PHP error messages. This is normally because of the PHP setup configuration on the server. If you are seeing warnings that are causing issues with your theme add the code below to your wp-config.php file and all errors will be hidden. ini_set(‘display_errors’, ‘Off’);ini_set(‘error_reporting’,…

Continue Reading How to Disable WordPress PHP Error Messages

How to change menu items to sentence case in WordPress

// Update menu items to sentence case add_action(‘wp_loaded’, ‘fl_update_menu_items_case’); function fl_update_menu_items_case() { // Get all of the menu item posts $all_posts = get_posts([ ‘posts_per_page’ => -1, ‘post_type’ => ‘nav_menu_item’, ]); // Loop each one setting the title case foreach ( $all_posts as $single ) { wp_update_post([ ‘ID’ => $single->ID, ‘post_title’ => ucfirst( strtolower( $single->post_title )…

Continue Reading How to change menu items to sentence case in WordPress