Display Events Map within Theme Template

Home Forums Calendar Products Events Calendar PRO Display Events Map within Theme Template

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1460378
    mikeill
    Participant

    Hey Folks,

    Are you able to tell me the code to load the necessary css and js scripts to display Events Calendar (community events) within my own theme template file?

    Php seems to be working. I’m sure I can find it, but would love it if you saved me the trouble.

    `

    `

    Peace.
    –iLL

    #1461348
    Victor
    Keymaster

    Hi There!

    Thanks for reaching out to us!

    Just wanted to let you know that we are dealing with a high volume of threads at the moment and it may take us more than usual to get back to you.

    We appreciate your patience while we slowly get back to normal response times.

    Best,
    Victor

    #1461512
    Cliff
    Member

    Hi, Mike.

    Community Events pages are actually not real “pages”. They load with WP_Router class.

    Are you trying to embed the Community Events form elsewhere on your site, like in a page you created?

    #1473353
    mikeill
    Participant

    Hey Victor. I hadn’t even realized that this thread had been responded to. Yes. We created a front-page.php template and are adding it within a Bootstrap column.

    One of the guys on the project got as far as adding this to the template:

    $query = new WP_Query( $args );
    $total_events = $query->post_count;
    wp_reset_query();
    if ( $total_events ) {
    echo do_shortcode( '[tribe_events tribe-bar="false" view="map"]' );
    } else {
    echo do_shortcode( '[tribe_mini_calendar]' );
    }

    And it looks okay. Does that look like the right way of doing it? I’d like to modify the template to not show the listing of events, or perhaps only show a featured event. And would also like the “create event” button to be moved into the wrapper div for the map.

    Thanks and happy Thursday.

    #1475848
    Cliff
    Member

    I’d recommend trying the [tribe_community_events] shortcode. If it doesn’t work (I don’t think it works unless Pretty Permalinks are disabled), I’d suggest finding its function, doShortCode(), within /wp-content/plugins/the-events-calendar-community-events/src/Tribe/Main.php

    If this doesn’t help you get further along, would you be able to share an annotated screenshot, screen capture video, and/or relevant URLs to clarify exactly what you’re wanting here?

    #1479453
    mikeill
    Participant

    Hey Cliff,

    When you say that you don’t think do_shortcode(‘[tribe_community_events]’); works unless Pretty Permalinks are disabled, you mean we need to have the default url string in order for it to work?

    I definitely don’t see anything with do_shortcode(‘[tribe_community_events]’); with /post_name permalink structure.

    What I think I want to do is hook into the ‘[tribe_mini_calendar]’ function or override a template so we can modify the output to our linking.

    Does that make sense? For example, I want to show:

    1. the map of events
    2. a create event button
    3. a featured event or two.

    #1479643
    Cliff
    Member

    Sorry I misunderstood. I thought you wanted to render the Community Events form anywhere on your site via shortcode.

    It sounds like you want to render map view, which is only possible via yoursite/events/map or via [tribe_events view=”map”]

    Would you be able to share an annotated screenshot of where you want to insert a “create event” button (linking to your Community Events form) and where you want to insert a featured event or two.

    #1480416
    mikeill
    Participant

    Sure, man.

    Here’s a pic with what I want: https://d.pr/free/i/81Q8Fg

    This is within a template php file we’re pulling into the front page of the site.

    • This reply was modified 6 years, 2 months ago by mikeill.
    #1480579
    Cliff
    Member

    Instead of doing a template override in addition to whatever customization you’re already doing, I’d recommend using the action hooks.

    https://wordpress.org/plugins/simply-show-hooks/ can be handy to discover the action hook you might need (third-party, not guaranteed or supported by us). Although it’s old, I find it still works.

    #1498792
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. 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.

    Thanks so much!
    The Events Calendar Support Team

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Display Events Map within Theme Template’ is closed to new replies.