Remco Tolsma on "[Plugin: Pronamic Events] Additional custom fields"

ساخت وبلاگ

Hi,

Very nice plugin.

I have gotten it working with Gravity Forms (v1.9.4) and Gravity Forms + Custom Post Types (v3.1.5), so users can submit events.

I would like to add additional custom fields to your custom post type, e.g. a field to hold the name of the event organiser? Would you be able to provide guidance about how I might do this?

Thanks,
rt.

https://wordpress.org/plugins/pronamic-events/

If you are not a WordPress developer you could consider to use the "Advanced Custom Fields" plugin:
https://nl.wordpress.org/plugins/advanced-custom-fields/

If you are familiair with WordPress hooks you can also use the pronamic_event_fields filter from the Pronamic Events plugin:
https://github.com/pronamic/wp-pronamic-events/blob/1.2.1/admin/meta-box-event-details.php#L59-L87

You could for example add the following code/function to a custom plugin or your custom theme functions.php file:

<?php
function my_pronamic_event_fields( $fields ) { $fields['organiser'] = array( 'id' => 'pronamic_event_organiser', 'label' => __( 'Organiser', 'my-text-domain' ), 'meta_key' => '_pronamic_event_organiser', ); return $fields;
}
add_filter( 'pronamic_event_fields', 'my_pronamic_event_fields' );

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 440 تاريخ : جمعه 5 شهريور 1395 ساعت: 15:39