Sort tags and categories with ACF in WordPress

Start by adding a custom field to your tag or category with Advanced Custom Fields, name it to “custom_field” or something, and add this to your functions.php.

 

Modify the tag or category object in the loop by getting the custom field, but it back, sort it and use it how you want.

 

Get current post ancestors in WordPress

Get current post ancestors and list it’s children in WordPress.

 

MySQL queries and php load time in WordPress

Get number of MySQL queries and php load time of your theme in WordPress, by adding this last in your footer.php-file. Don’t forget to add the constant WP_ENV to your functions.php to make sure it stays in the development environment.