Title: Custom fields
Last modified: May 13, 2020

---

# Custom fields

 *  Resolved [davidgimenezq](https://wordpress.org/support/users/davidgimenezq/)
 * (@davidgimenezq)
 * [6 years ago](https://wordpress.org/support/topic/custom-fields-352/)
 * How I can add a custom class to a custom field?
 * This is currently displayed:
 * <div class=”atbd_custom_field_content”>
    <p>Example 1</p> </div>
 * <div class=”atbd_custom_field_content”>
    <p>Example 2</p> </div>
 * I want this to be displayed:
 * <div class=”atbd_custom_field_content **custom1**“>
    <p>Example</p> </div>
 * <div class=”atbd_custom_field_content **custom2**“>
    <p>Example</p> </div>
 * This is to be able to put a custom style to each of the custom fields.
    If not,
   could you give me some idea to carry it out.
 * Please i need help, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Rafiz Sejim](https://wordpress.org/support/users/rafizsejim/)
 * (@rafizsejim)
 * [6 years ago](https://wordpress.org/support/topic/custom-fields-352/#post-12831755)
 * Hello David,
 * Thank you for reaching us out. Please go through the reply below.
 * Regards,
    -  This reply was modified 6 years ago by [Rafiz Sejim](https://wordpress.org/support/users/rafizsejim/).
 *  [aazztech](https://wordpress.org/support/users/aazztech/)
 * (@aazztech)
 * [6 years ago](https://wordpress.org/support/topic/custom-fields-352/#post-12831825)
 * Hello David,
 * Thank you for reaching us out.
 * It is not possible to add custom class to a custom field in the current version.
   However we’ve added a filter hook for it in the [beta version](https://directorist.com/beta-version/),
   so that you can do your customization.
 * Please install the beta version and then add the following hook in your themes
   function.php file to apply the hook.
 *     ```
       add_filter( 'atbdp_custom_field_class', 'add_custom_field_class', 10, 2);
       function add_custom_field_class( $content, $id ) {
         $classes     = " new-custom-class new-custom-class-$id";
         $new_classes = $content . $classes;
   
         return $new_classes;	
       }
       ```
   
 * We always strive for customer satisfaction. Our plugin is free to use and the
   only thing that keeps us motivated is the reviews. Would it be possible for you
   to spend a couple of minutes from your valuable time reviewing our plugin [here](https://wordpress.org/support/plugin/directorist/reviews/)?
   
   It would greatly help us to amp our performance!
 * Best Regards
    -  This reply was modified 6 years ago by [aazztech](https://wordpress.org/support/users/aazztech/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom fields’ is closed to new replies.

 * ![](https://ps.w.org/directorist/assets/icon-256x256.gif?rev=3185058)
 * [Directorist: AI-Powered Business Directory, Listings & Classified Ads](https://wordpress.org/plugins/directorist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/directorist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/directorist/)
 * [Active Topics](https://wordpress.org/support/plugin/directorist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/directorist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/directorist/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [aazztech](https://wordpress.org/support/users/aazztech/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/custom-fields-352/#post-12831825)
 * Status: resolved