How to modify text strings in plugins and themes

Most plugins and themes provide filter hooks that allow you to modify strings like titles and labels. However not all do. Luckily there is a filter hook you can use to customise these strings. Plugins or themes that allow any level of customisation usually have strings passed through filters that provide a chance to manipulate

Extract all ACF fields as variables

A handy little snippet that allows you to extract all ACF fields attached to a post as named variables. Advanced Custom fields (ACF) provides its own API to retrieve metadata; get_field() returns the value of a specific field, while get_fields() returns an array of all the values of a post or object. Using the PHP function extract() we

Customize Navigation Menu widgets in sidebars

The Navigation Menu widget allows you to display a custom menu on a registered sidebar… The widget is not customizable as it does not provide any options, fortunately, there’s a hook for that. The widget outputs the menu using the standard wp_nav_menu() function and passes its arguments through the widget_nav_menu_args filter. Using this filter you may modify things

Add a Google Map API Key to Advanced Custom Fields (ACF)

The Google Map field in ACF is an interactive map field featuring a search input, location finder and a draggable marker. Sometimes you may be presented with a nasty error message instead of a map. Here is how you fix it. The error message above is displayed instead of the map field when a Google API

Change the default WooCommerce template directory in your theme

WooCommerce template files can be easily overridden by copying files to a specific directory in your theme. Learn how to change this to match your own theme file structure. WooCommerce template files contain the markup and structure of the store frontend and HTML emails. All you need to do to override template files is to make a directory named

Recent Articles