Hello! I hope someone can help me out with this...
I am creating a custom add listing input page and I will not use any predefined fields except one or two.
One I want to use is the TITLE, but I want it to be set from three custom fields entered from the user front-end interface.
So, instead of the user entering his own listing title, I would like to create it from three custom fields he has filled in.
The user fills in these from the front_ui :
Custom input fields : Country, Theme, Leader Name
Their codes being :
To illustrate the general idea in a basic code example:
$Title = [ct_Continent_selectbox_37b7] + [ct_Event_Titl_text_522d] + " with " + [ct_Name_of_Re_text_4503]
And the result to save to the title of the listing would look like this for example :
Jamaica Yoga Retreat with John Smith
Should I use this one :
$listing_data['post_title'] = ?
Would in be done in place of this piece of code in
<?php if(post_type_supports('directory_listing','title') ): ?>
<label for="title"><?php _e( 'Title', $this->text_domain ); ?></label>
<input class="required" type="text" id="title" name="listing_data[post_title]" value="<?php echo ( isset( $listing_data['post_title'] ) ) ? esc_attr($listing_data['post_title']) : ''; ?>" />
<p class="description"><?php _e( 'Enter title here.', $this->text_domain ); ?></p>
Any help provided would be very much appreciated, thanks!