Plugins

Tips and techniques for working with powerful WordPress plugins.


WPML: hide or rewrite language URLs in language switcher and hreflang tags

Amend the list of languages used by WPML’s language switcher, icl_get_languages() function and hreflang tags

WPML’s ICL_LANGUAGE_CODE constant always returns the default language within AJAX functions

Find out how to get the currently active language from WPML when using AJAX functions

ACF and WPML: Global Options values instead of different values for each language

Using Advanced Custom Fields and WPML, retrieve a global Option value regardless of the current active language.

WooCommerce: Post Title missing from Product page

If certain Product information is missing from your WordPress theme with WooCommerce support, this code snippet will help.

Include ACF flexible content fields in search queries

Modify the WordPress search logic to include ACF Flexible Content fields for more accurate results.

Disable plugins directly from the database

If your WordPress site is showing a 500 server error due to a faulty plugin, you may need to deactivate the plugin without access to the website backend.

Flexible layout; copying first section content across to excerpt on save

Generate an excerpt from your ACF Flexible Content fields for situations where you are not using the standard WordPress content field.