How do I pull custom fields into the description?

The mlp_location_description filter gives you access to the description field before it is sent to the front end. Here you can get fields from the database and add and change the description text. Custom fields created with the Map List Pro mlp_location_metaboxes filter are passed to the function along with the description html, and the location post object.

This is an example of the two fields created by the mlp_location_metaboxes example being used to add a telephone number and opening hours – this code would be added to your functions.php file in your theme:


SmartRedFox has written 30 articles