Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #513317

    Hi,

    I’m using enfold with child theme.
    I followed this code and placed it in my functions.php

    add_action('tribe_events_template', 'avia_events_template_paths', 10, 2);
    	
    	function avia_events_template_paths($file, $template)
    	{
    		$redirect = array('default-template.php' , 'single-event.php' , 'pro/map.php' );
    		
    		if(in_array($template, $redirect))
    		{
    			$file = get_stylesheet_directory_uri() . "config-events-calendar/views/".$template;
    		}
    		
    		return $file;
    	}

    To force load the events calendar files in my child theme. Still no luck. Whatever changes I do in in he default-template.php or single-event.php, they don’t show and still load the files from the parent theme.
    I did duplicate the complete folder config-events-calendar in my child theme.
    Could you verify is this code is still applicable (because I got it from a 2014 thread)

    Thank you.

    #513423

    Hi Spiv!

    I just tried the code and seems not to working.
    Can you explain me, how you want to integrate it?

    Cheers!
    Basilis

    #513592

    Hi Basilis,

    I just want to modify some code to the default-template.php or single-event.php from the events calendar in my child theme.
    When I copy the complete folder config-events-calendar in my child theme no changes are reflecting. The changes only reflect when I edit these files in the parent theme. But this would be annoying regarding future updates.
    I read a thread from a year ago where one had the same issue and try to force the files in the child theme, but seems the code above is not working.

    #514204

    Hey!

    Create a folder called “tribe-events” inside the child theme folder. Add the templates (ex: single-event) there. For more info, refer to this link: https://theeventscalendar.com/knowledgebase/themers-guide/

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.