Custom Fields

Home Forums Calendar Products Events Calendar PRO Custom Fields

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #12135
    Mike
    Participant

    Is there a way to add in the custom fields that I have set up for my regular posts into the event posts. Basically I use a custom field to group together various posts & pages and would like to be able to include events in this output.

    #12151
    Rob
    Member

    Hey Mike, let me see if Jonah has any suggestions. I don’t believe this is possible without quite a bit of customization but I’ll let him comment for certain.

    #12187
    Jonah
    Participant

    Hi Mike,

    Do you have some examples you can provide of your code so far so I know what I’m working with? I.e. what is the code you are using to have the custom fields for your regular posts?

    Regards,
    Jonah

    #12195
    Mike
    Participant

    Hi Jonah,

    I’m not using any custom code to achieve the additional custom fields, just the built in ‘Add new custom fields’ meta info to apply a field name and its value.

    In the page/post templates I’m using get_post_meta() to test if a post/page has a particular meta value and then to treat it accordingly.

    Clear as mud? Good.

    #12200
    Jonah
    Participant

    Hi Mike,

    Clear as mud, thank you! While we don’t add support for custom fields in the current version but will be doing so in 2.1 there is an easy workaround for now. Just add this to your functions.php file:


    /* Adds custom field support to Tribe Events */
    add_action('init', 'my_custom_init');
    function my_custom_init() {
    add_post_type_support( 'tribe_events', 'custom-fields' );
    }

    I would also highly suggest taking a look at the wonderful Advanced Custom Fields plugin to make working with custom fields much easier: http://plugins.elliotcondon.com/advanced-custom-fields/

    Regards,
    Jonah

    #12267
    Mike
    Participant

    Hi Jonah,

    Thanks for the code that’s brilliant, works a treat. Also for the link to the advanced-custom-fields plugin, looks great but maybe a bit much for what we need.

    Cheers!

    #12286
    Rob
    Member

    Awesome to hear, Mike! Glad to see you got this working. Let us know if anything else comes up going forward.

    #974902
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Custom Fields’ is closed to new replies.