Results 1 to 5 of 5

Thread: Unhiding the Custom Fields metabox in the WP Admin UI

  1. #1
    Thread Starter
    igerry's Avatar
    Join Date
    Jul 2012
    Location
    Philippines
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhiding the Custom Fields metabox in the WP Admin UI

    As a user, I have the need to add some extra fields on my installation using custom forms of Vantage which is great. But these fields aren't currently showing in the WP Admin UI -- you have to use the Vantage "Edit Listing" form to get access to the custom fields.

    After some checking, it seems that there is currently no way to unhide the "Custom Fields Metabox" in the WordPress Admin UI without touching the core Vantage files.

    To Users

    For those of you who may want to make it appear on their web sites, you can do the following:

    1. Go to the Vantage Theme directory under "includes/admin".
    2. Edit the file listing-single.php. In line 16 (Vantage v1.2):

    Code:
    function va_listing_metaboxes() {
        $remove_boxes = array( 'commentstatusdiv', 'commentsdiv', 'postexcerpt', 'revisionsdiv', 'postcustom', 'authordiv' );
    
        foreach ( $remove_boxes as $id ) {
    		remove_meta_box( $id, VA_LISTING_PTYPE, 'normal' );
        }
    }
    3. Just remove "'postcustom'," (Note: Don't forget the comma). Resulting to:

    Code:
    function va_listing_metaboxes() {
    	$remove_boxes = array( 'commentstatusdiv', 'commentsdiv', 'postexcerpt', 'revisionsdiv', 'authordiv' );
    
    	foreach ( $remove_boxes as $id ) {
    		remove_meta_box( $id, VA_LISTING_PTYPE, 'normal' );
    	}
    }
    You'll now be able to see custom fields un the WP Admin UI.

    To The AppTheme's Vantage Team

    I would like to request the Vantage Team to modify the listing-single.php code by adding a WP filter so that the Metaboxes can be controlled in a Vantage Child Theme.

    The code would be fairly straight forward and would involve changing a single line in listing-single.php file and could be sent out fairly quickly as a minor update.

    It will be something like the one below:

    Code:
    function va_listing_metaboxes() {
    	$remove_boxes = apply_filters( 'va_listing_metaboxes', 
    		array( 'commentstatusdiv', 'commentsdiv', 'postexcerpt', 'revisionsdiv', 'postcustom', 'authordiv' ) );
    
    	foreach ( $remove_boxes as $id ) {
    		remove_meta_box( $id, VA_LISTING_PTYPE, 'normal' );
    	}
    }
    Hope it can be accomodated. Thanks.

  2. #2
    fatima's Avatar
    Join Date
    Jul 2013
    Location
    United Kingdom
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    tcarter's Avatar
    Join Date
    Jun 2011
    Location
    United States
    Posts
    424
    Thanks
    15
    Thanked 91 Times in 77 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    igerry's Avatar
    Join Date
    Jul 2012
    Location
    Philippines
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    Thread Starter
    igerry's Avatar
    Join Date
    Jul 2012
    Location
    Philippines
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. JR Custom Fields in WP admin
    By hoianddoei in forum Help Using JobRoller
    Replies: 0
    Last Post: June 27th, 2013, 05:11 AM
  2. How does the admin or any user see the custom fields
    By dealio in forum Help Using ClassiPress
    Replies: 1
    Last Post: January 14th, 2012, 01:07 AM
  3. Custom Fields for Admin
    By thuara in forum ClassiPress General Discussion
    Replies: 2
    Last Post: April 26th, 2011, 08:06 AM
  4. Custom Fields for Admin
    By thuara in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: April 23rd, 2011, 08:40 AM
  5. Custom fields in admin panel
    By jeffnaramor in forum Help Using ClassiPress
    Replies: 1
    Last Post: December 24th, 2010, 08:43 AM