Title: Adding fields and tabs
Last modified: April 6, 2021

---

# Adding fields and tabs

 *  Resolved [chris29888](https://wordpress.org/support/users/chris29888/)
 * (@chris29888)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/adding-fields-and-tabs/)
 * Parts of this have been asked before, but I can’t get the suggested solutions
   to work.
    I want to add custom fields for the details and specifications categories
   of my listings. I managed to add a custom **detail** field by adding the following
   two filters to my functions.php:
 *     ```
       add_filter( 'auto_listings_metabox_details', function ( $fields ) {
           $prefix = '_al_listing_';
           $fields[3] = array(
               'name' => __( 'Test-Detail', 'auto-listings' ),
               'desc' => __( 'A custom description', 'auto-listings' ),
               'id' => $prefix . 'test-detail',
               'type' => 'text',
           );
           return $fields;
       } );
   
       add_filter( 'auto_listings_details_array', function( $fields ) {
       	$fields[ 'Test-Detail' ] = auto_listings_meta( 'test-detail' );
       	return $fields;
       } );
       ```
   
 * But when I try to add custom **specifications**, it only shows up in the backend.
   The frontend doesn’t display the value I entered.
    Here’s the code I’m using 
   to generate the custom spec:
 *     ```
       add_filter( 'auto_listings_metabox_specs', function ( $fields ) {
           $prefix = '_al_listing_';
           $fields[3] = array(
               'name' => __( 'Test-Spezifikation', 'auto-listings' ),
               'desc' => __( 'A custom description', 'auto-listings' ),
               'id' => $prefix . 'test-spezifikation',
               'type' => 'text',
           );
           return $fields;
       } );
   
       add_filter( 'auto_listings_spec_fields', function( $fields ) {
       	$fields[ 'Test-Spezifikation' ] = auto_listings_meta( 'test-spezifikation' );
       	return $fields;
       } );
       ```
   
 * There’s probably an error in the first filter as that’s the one I tried to reverse-
   engineer from the previous “details” filter.
 * And how would I go about adding my own tabs? I need to sort the available specs
   into smaller sub-categories instead of listing everything under “details” and“
   specifications”.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-fields-and-tabs%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [longnguyen](https://wordpress.org/support/users/longnguyen/)
 * (@longnguyen)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/adding-fields-and-tabs/#post-14288842)
 * Hi Chris,
 * I’m afraid that the coding is beyond the scope of plugin support in this forum.
   You can try to ask for help in the FB group or [codeable.io](https://codeable.io/),
   other developers might help you to achieve your goal.
    [https://www.facebook.com/groups/metaboxusers/](https://www.facebook.com/groups/metaboxusers/)
   [https://codeable.io/](https://codeable.io/)
 *  Thread Starter [chris29888](https://wordpress.org/support/users/chris29888/)
 * (@chris29888)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/adding-fields-and-tabs/#post-14288872)
 * Understandable. Thank you for your speedy reply and the helpful links!

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

The topic ‘Adding fields and tabs’ is closed to new replies.

 * ![](https://ps.w.org/auto-listings/assets/icon-128x128.jpg?rev=1967501)
 * [Auto Listings - Car Listings & Car Dealership Plugin for WordPress](https://wordpress.org/plugins/auto-listings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/auto-listings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/auto-listings/)
 * [Active Topics](https://wordpress.org/support/plugin/auto-listings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/auto-listings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/auto-listings/reviews/)

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [custom tabs](https://wordpress.org/support/topic-tag/custom-tabs/)

 * 2 replies
 * 2 participants
 * Last reply from: [chris29888](https://wordpress.org/support/users/chris29888/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/adding-fields-and-tabs/#post-14288872)
 * Status: resolved