Filter Bar conflicts with theme

Home Forums Calendar Products Filter Bar Filter Bar conflicts with theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1596468
    Sara
    Participant

    Hello. I would appreciate if you could help with my problem. Although I have installed and activated the Filter Bar plugin, it does not display at all when I navigate to my Events Calendar page (at default URL, <my site>/events).

    This problem is observed with a custom theme that I have. The Filter Bar DOES display when I switch to default WP theme TwentySixteen. So the problem seems to be with my custom theme.

    Under Events -> Settings -> Display -> Events template, I have selected “Default Events Template”, under both the TwentySixteen theme (works), and my custom theme (doesn’t work).

    Looking at “Default Events Template” in wp-content/plugins/the-events-calendar/src/views/default-template.php, It looks like the calendar area including the Filter Bar is generated simply using a call to tribe_get_view(), with get_header() above it and get_footer() below. I don’t really understand how my header or footer content would affect the Filter Bar’s presence (it’s not as if my CSS is hiding it somehow – I checked and the Filter Bar element simply does not exist when using my custom theme).

    Are there common causes of incompatibility with themes that I should look for? Have you seen other instances in which a theme breaks the Filter Bar? I would appreciate any help you could provide in debugging this. Thank you.

    Addl. Info:
    – No JS console errors observed
    – No PHP errors observed in logs with Events -> Settings -> General -> Debug mode checked to true.

    #1597677
    Cliff
    Member

    Hi, Sara. Thanks for the detailed question and sorry you’re experiencing this.

    Whenever troubleshooting, it’s best to enable WP_DEBUG and WP_DEBUG_LOG (which will create a file on your server at /wp-content/debug.log if there are any WP_DEBUG messages) and share any debug messages you see while trying to replicate this issue.

    You should generate the debug.log file because you have that Events Debug Mode option enabled.

    Please share your debug.log file after replicating the issue, either pasting its contents here or a Dropbox-type link to it.

    Please also provide a copy of your theme’s .zip install file (unmodified from the theme author). This would need to be a download link.

    #1597908
    Sara
    Participant

    Thanks for your reply Cliff. I was actually able to get this working. The problem was being caused by my theme’s usage of Timber templating.

    https://theeventscalendar.com/support/forums/topic/timber-not-working-with-the-filter-bar/
    The above thread helped me to resolve the issue. It looks like the Events Calendar contents functions have to be invoked within the actual Timber twig file for the filter bar to show up:

    
    <div id=events>
    {{fn('tribe_events_before_html')}}
    {{fn('tribe_get_view')}}
    {{fn('tribe_events_after_html')}}
    </div>
    

    A cautionary tale for users of Timber… Please consider my issue resolved now. Thank you.

    #1598042
    Cliff
    Member

    I’m glad you were able to figure that out. Thanks for letting me know.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Filter Bar conflicts with theme’ is closed to new replies.