Tagged: Custom post fields - buddyblog
Hi,
I am using buddyblog – it is a great addition to my Film producers community website. I would like to custom post fields so that producers can post information directly related to their project (e.g. budget, genre, audience….).
2 questions:
How can I custom post fields to create a post Template accessible to upfront users?
Is there a way community members could themselves create new fields?Thank you so much for your help!
MartinHi Martin,
Thank you for asking.It is possible for a site admin to add fields y using custom code. If you can tell me the field name and type I can provide code for that.
Sorry about the second issue but the user can not crate their own field. Only can add values based on admin provided fields.
Thank you
BrajeshHi Brajesh,
Thank you for the quick reply.
I would need to add the following fields:
– Synopsis (text)
– Genre (text)
– Cast (text)
– Release date (date picker)
– Budget (number)
– Twitter (URL)
– Reel (Video upload)
– Ratings (checkbox: Y, T7, G, PG, 14 or MA).Please let me know where I should insert the code when provided.
Thanks so much,
MartinHi Martin,
I am sorry for the delayed reply.
The problem is BP Simple Front End post currently does not support date & URL. I will need to update the simple front end post plugin first. Please give me till Monday and I will add these.Thank you
BrajeshHi Martin,
I am on it. There will remain one thing though, I may not be able to add the support for date select box( was planning to add using some Ui widget). The current datebox acts like a plain text field.Hi Martin,
My apologies for the delay.1. Please upgrade to Bp Simple Front End post plugin
2. Please try adding this code to bp-custom.php and let me know if it works or not?
add_filter( 'buddyblog_post_form_settings', 'buddyblog_martin_custom_fields' ); //modify buddyblog form settings function buddyblog_martin_custom_fields( $settings ) { $custom_fields = $settings['custom_fields']; //already registered fields //allowed field //1. textbox //2. texarea //3. radio //4 .select //5 .checkbox //6. date //7. url //. number(integer) //7. hidden $custom_fields['synopsys'] = array( //on single page use get_post_meta( $post_id, 'synopsys', true ) to access it 'label' => 'Synopsis', 'type' => 'textarea', 'default' => '', ); $custom_fields['genre'] = array( 'label' => 'Genre', 'type' => 'textarea', //change to textbox for single line text field 'default' => '', //in case of ); $custom_fields['cast'] = array( 'label' => 'Cast', 'type' => 'textarea', 'default' => '', //in case of ); $custom_fields['release_date'] = array( 'label' => 'Release date', 'type' => 'date', 'default' => '', //in case of ); $custom_fields['budget'] = array( 'label' => 'Budget', 'type' => 'number', 'default' => '', //in case of ); $custom_fields['twitter'] = array( 'label' => 'Twitter', 'type' => 'url', 'default' => '', //in case of ); $custom_fields['ratings'] = array( 'label' => 'Ratings', 'type' => 'checkbox', 'default' => '', //in case of //only applicable for select/radio/checkbox etc 'options' => array( array( 'label' => 'Y', 'value' => 'Y' ), array( 'label' => 'T7', 'value' => 'T7' ), array( 'label' => 'G', 'value' => 'G' ), array( 'label' => 'PG', 'value' => 'PG' ), array( 'label' => '14', 'value' => '14' ), array( 'label' => 'MA', 'value' => 'MA' ), ) ); $settings['custom_fields'] = $custom_fields; $settings['upload_count'] = 1;//one upload return $settings; }
Thank you
Brajesh
The topic ‘ [Resolved] Custom post fields in buddyblog’ is closed to new replies.