Required Fields and Child Theme

Home Forums Calendar Products Community Events Required Fields and Child Theme

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #962331
    Molly
    Participant

    Hi. I am wanting to require Title, Description, Venue, Organizer and Event Start Date. I followed the directions to edit the functions.php file. I added the code below:

    add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 );
     
    function my_community_required_fields( $fields ) {
        $fields = array(
            'post_title',
            'post_content',
            'EventStartDate',
            'venue',
            'organizer',
        );
    	 return $fields;
    }

    I am not able to get the code to work but I am using a child-theme so I’m wondering if that’s the issue? I would prefer to add this to the child-theme functions file so it won’t get over-written on theme upgrade.

    I am doing something wrong?

    Thanks!

    #962451
    Jami
    Blocked

    Hi Molly,

    Great idea to use a child theme. This is definitely the way to go if you’re planning on making customizations like this!

    So I went and tested the function on my own child theme installation and it worked like a charm:

    http://d.pr/i/14wDz

    Can you try this on a default theme like Twenty Twelve? Here’s a child theme I’ve put together for that theme if you’d like to test it out there:

    http://d.pr/f/1ivVv

    I wonder if there may be a conflict in your current theme and switching to a default theme will help us determine that.

    Kind Regards,
    Jami

    #963653
    Brian
    Member

    I am going to be taking over this thread from Jami so let me know if you need more help. Thanks

    #963664
    Molly
    Participant

    Hi. Going back to the theme I realized that they do not have it compatible with child themes. I made the changes to the parent theme and it worked!

    Thanks!

    #963679
    Brian
    Member

    I am glad to see you were able to figure it out.

    I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.

    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Required Fields and Child Theme’ is closed to new replies.