Skip Navigation

[Résolu] Types Custom Fields in Advanced Ads post

This support ticket is created Il y a 2 années et 2 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 réponse, has 2 voix.

Last updated by Waqar Il y a 2 années et 1 mois.

Assisted by: Waqar.

Auteur
Publications
#2304393

I am attempting to create and use custom fields and meta box inside an Advanced Ads third-party post (custom post type). Here is a post with instructions by Advanced Ads for how to accomplish this with Advanced Custom Fields. I would like to accomplish the same thing (creating custom fields and inserting them into the ads). Is this possible?
Here is the post from Advanced Ads website: hidden link

#2304685

Waqar
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

When a custom field group is added using the Toolset Types, its meta box ID for the post edit screen is generated in this format: wpcf-group-{field-group-slug}

For example, suppose the field group name is 'Book Info' and the slug for that field group would be 'book-info'. And this field group's meta box ID would be 'wpcf-group-book-info'.

To whitelist/allow this field group on the Ads post edit screen, the code will look like this:
( ref: hidden link )


add_filter( 'advanced-ads-ad-edit-allowed-metaboxes', 'my_advanced_ads_whitelist_meta_box');
function my_advanced_ads_whitelist_meta_box( $meta_boxes ){
    $meta_boxes[] = "wpcf-group-book-info"; // ID of the meta box
    return $meta_boxes;
}

The above code snippet can be included in the active theme's "functions.php" file.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.