A small warning ahead. The ‘Custom’ location feature requires a bit deeper understanding of WordPress (action hooks to be precise). We won’t be able to search/provide custom locations for you within the support policy.

The Advanced Messages plugin by default allows for messages to be displayed by a vast amount of different locations. All the most important positions are covered, but that isn’t always enough. Sometimes there’s the need for a more more specific location, and that is where the ‘Custom’ location option can be used for.

At the bottom of the locations list there’s the ‘Custom’ option. When selected a new text field will appear below the dropdown. This is where you can enter the custom location you want to display the message. It is possible to enter any WordPress / WooCommerce action hook in there.

Finding the right action hook

Read more about WordPress action hooks.

This is a difficult part of the documentation; everyone will have a different location (and thus action hook) they want to position the message at. Below I’ll describe a couple ways you can find the right action hook for your requirements.

Documentation

WordPress and WooCommerce are both well documented. Here are a couple resources where you can find hooks for the platforms:

WooCommerce has all its hooks documented here:
https://docs.woocommerce.com/wc-apidocs/hook-docs.html

WordPress hooks can be found here:
https://codex.wordpress.org/Plugin_API#Hooks:_Actions_and_Filters

In the code

All action hooks are available in the code. If you know where you want to position the message you can try and find the related template file for it (tip: use the template hints plugin).

Browse to the file in the code and open the file.

Here’s a example of a template file in WooCommerce where a action hook is available. All action hooks are created by using the add_action() function. The first argument in there is the string you’re looking for.

In this example you’d be looking at the following code

<?php do_action( 'woocommerce_product_meta_end' ); ?>

Where ‘woocommerce_product_meta_end’ would be the string you can enter in the ‘Custom’ text field (without the quotes).

With help

As mentioned we are not able to provide you with custom locations based on your needs within the support scope. If you’re uncomfortable with the above methods / can’t find what you’re looking for; it is recommended to contact your web-developer. Any WordPress plugin/theme/site developer should have the knowledge to help you find the right hook for your needs.

Setting the action hook priority

Since version 1.3.0 of the Advanced Messages for WooCommerce plugin it is also possible to set a custom priority for the action hook. This ensures you have more granular control of where a message will appear. You can enter a priority by adding a colon followed by a integer in the ‘Location hook’ field.