The Advanced Classifieds & Directory Pro documentation is a bit sparse when it comes to its custom fields feature. With ACADP you can add custom fields to your listings, but it’s not clear from the documentation whether those custom fields can be used with the [acadp_listings] shortcode.

Fortunately you can use custom fields with the [acadp_listings] shortcode, and it’s really easy.

First, you’ll need to get the custom field ID. In your WordPress dashboard, go to Classifieds & Directory / Custom Fields and click on your custom field. You’ll find the field ID at the top, next to Field ID (obviously).

You can add custom fields to the [acadp_listings] shortcode like this:

custom_fields="[field ID]:[field value]"

You can add multiple field values by separating them with a “|”, and you can separate multiple custom fields with a comma. (If there is comma in your field value, you’ll probably need to escape it with a “\”.)

Here is an example that puts it all together:

[acadp_listings custom_fields="1101:Field Value,2202:First Option|Second Option|Third Option\, with a Comma"]

Just one caveat: custom fields only work with the [acadp_listings] shortcode. They do not work with [acadp_category] or [acadp_location]. (If you do add them to the _category or _location shortcodes, it just won’t do anything.)

I hope this helps someone else, because it took me way too long to figure out myself.

Leave a Reply

Client Login