Add Google Analytics to Functions.php in WordPress

The following code will add Google analytics tracking code to your WordPress site’s header. Simply replace “UA-000000000-1” with your analytis UA tracking code and insert the snippet into functions.php.

Limit Search Results to Blog Posts Only

The following snippet will limit search results to display blog posts only on your search results page. Copy and paste the following into functions.php


Hide Reviews Tab in Woocommerce

Adding the following snippets to functions.php file will remove the Reviews tab from your Woocommerce store in WordPress.

Hide Default Editor in Admin

If you want to remove the default editing area from specific pages or posts in the admin area here is how to do it. Put the following in your functions.php file: