• Resolved aimdoll

    (@aimdoll)


    Hello,

    I am trying to override a template file. I copied the ical-link.php to mytheme/tribe/events/v2/components/ical-link.php. It’s now working. I am wondering if I got the folder structure correct for overriding templates in a child theme. I followed the documentation located here:

    https://theeventscalendar.com/knowledgebase/k/customizing-template-files-2/

    Currently, a co-worker added the code directly to the file in the Plugin which is a huge no no, hence I need to override the file properly. If you visit the site it’s only working because the plugin has been edited directly.

    Any help you might be able to provide is greatly appreciated.

    Best Regards,

    Amy Singleton

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Amy,

    Thanks for reaching out. I’m sorry to hear that you’re experiencing this issue.

    The path you mentioned [your-theme]/tribe/events/v2/components/ical-link.php is correct and the override should be working correctly.

    Do you mind sharing a snippet with the customization so I try and replicate this issue on my end?

    Regards,
    Eugene.

    Thread Starter aimdoll

    (@aimdoll)

    Hello Eugene,

    Below is the code that is in the ical-link.php file that I am using to override the template from the plugin:

    
    /**
     * Component: iCal Link
     *
     * Override this template in your own theme by creating a file at:
     * [your-theme]/tribe/events/v2/components/ical-link.php
     *
     * See more documentation about our views templating system.
     *
     * @link http://m.tri.be/1aiy
     *
     * @version 5.0.1
     *
     * @var object $ical Object containing iCal data
     */
    
    if ( empty( $ical->display_link ) ) {
    	return;
    }
    
    ?>
    <div class="cstmbtns">
     <a class="cstm_link"
    		title="<?php echo esc_attr( $ical->link->title ); ?>"
    		href="<?php echo esc_url( $ical->link->url ); ?>"
    	><?php echo esc_html( 'Google Calendar' ); ?></a>
      
    	<a
    		class="cstm_link"
    		title="<?php echo esc_attr( $ical->link->title ); ?>"
    		href="<?php echo esc_url( $ical->link->url ); ?>"
    	><?php echo esc_html( 'iCal Export' ); ?></a>
     
    </div>
    
    Thread Starter aimdoll

    (@aimdoll)

    Hello Again Eugene,

    Happy Holidays! I am checking back to find out if you have been able to replicate this issue on your end and if there is a bug fix planned for release? Thanks again for all your help.

    Best Regards,

    Amy Singleton

    Hi @aimdoll I’m very sorry for the delayed response. We’ve have fewer support agents available throughout the holiday period and that’s why its taken this long to get back to you.

    I’ve added the snippet you shared to my child in the path [child-theme]/tribe/events/v2/components/ical-link.php and it worked as expected.

    This is the output I got on my end http://p.tri.be/XyL1Wb (I realize it looks slightly different since I don’t have the CSS to go with it) however it should work on your end as well.

    Do you mind temporality switching to the TwentyTwenty theme and try adding the snippet to it so we can see whether you’re experiencing a conflict with your current theme?

    Please let me know how it goes.

    Regards,
    Eugene.

    Plugin Support masoodak

    (@masoodak)

    Hi there,

    This thread has been pretty quiet for a while, so we’re going to go ahead and close it. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Have a great day.

    Kind regards,
    Masood

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Customizing Templates’ is closed to new replies.