Events Calendar title and breadcrumbs not showing

Home Forums Calendar Products Events Calendar PRO Events Calendar title and breadcrumbs not showing

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #965584

    Hi!

    I’m using the X theme on my site http://www.friluftsskolen.no (calendar can be found here: http://friluftsskole.no/finn-skole/). As you mightsee the title is not showing up in the header or in the breadcrumbs like on the other pages. Any idea how to fix this?

    #965724
    Nico
    Member

    Hi Torbjøn,

    Thanks for reaching out and sorry to hear that integration is not working smoothly. To elaborate a fix I’ll need to know how the theme is generating the title/breadcrumb part. Can you find that for me in the template files?

    If you need to share a big piece of code you can create a public Gist and share the link in your reply.

    Thanks,
    Nico

    #965891

    This reply is private.

    #966036
    Nico
    Member

    Hi Torbjøn,

    Thanks for getting that for me! Let’s see how you can amend the code to make it work with The Events Calendar.

    What the Theme code is doing is switching the output based on content-types (page, portfolio, etc) and views (404, search, etc). You can add some conditional tags to add Events support. For example:


    <?php elseif ( x_is_portfolio() ) : ?>

    <h1 class=”h-landmark”><span><?php the_title(); ?></span></h1>

    // add this to check if you are in an event single view
    <?php elseif ( tribe_is_event() && is_single() ) : ?>

    <h1 class=”h-landmark”><span><?php the_title(); ?></span></h1>
    //

    <?php endif; ?>

    Here’s a list of all conditional tags available:

    https://gist.github.com/jo-snips/2415009

    Maybe you can merge some together in a single condition, and have something like:


    <?php elseif ( x_is_portfolio() ) : ?>

    <h1 class=”h-landmark”><span><?php the_title(); ?></span></h1>

    // combine as many as you like if the output is the same
    <?php elseif ( tribe_is_upcoming() || tribe_is_past() || tribe_is_map() || tribe_is_photo() || tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_photo() ) : ?>

    <h1 class=”h-landmark”><span>Events</span></h1>
    //

    <?php endif; ?>

    Regarding the breadcrumbs, that doesn’t seem to work the same way but you can use a similar approach:


    <?php if ( $breadcrumbs == ‘1’ ) : ?>

    // add custom event conditionals, in this case it will work for single events
    <?php if ( tribe_is_event() && is_single() ) : ?>
    // just copied the generated html code and replace the current location with Events
    <div class="x-breadcrumbs"><span class="home"><i class="x-icon-home" data-icon=""></i></span> <span class="delimiter"><i class="x-icon-angle-right" data-icon=""></i></span> <span class="current">Events</span></div>
    <?php endif; ?>
    //

    Please try the title fix first and then the breadcrumbs one, so if something is not working we can isolate the problem.

    Thanks,
    Nico

    #966042

    Well, it does add a title. But it’s much huger than on other pages. Also, men I go to single event, places, hosts etc the title becomes “Nyheter” (news).

    Your breadcrumbs-code looks broken…

    #966079
    Nico
    Member

    Torbjøn,

    Thanks for the follow up!

    Regarding the huger title, from what I’m seeing in your site it seems some unwanted quotes got around the class name in <h1 class=”h-landmark” >. Can you check that on your end?

    I’ve created a Gist with that code here. Sorry for the broken code.

    Please let me know how this goes,
    Thanks,
    Nico

    #966094
    Nico
    Member

    Sorry I skipped this:

    Also, men I go to single event, places, hosts etc the title becomes “Nyheter” (news).

    Can you share with me the conditional you ended up using for this?

    Thanks,
    Nico

    #966168

    @The large title, thanks for the fix 🙂

    @conditionals, I used the same code as you provided above, I just exchanged “Events” with “Finn friluftsskoler”

    <?php elseif ( x_is_portfolio() ) : ?>

    <h1 class=”h-landmark”><span><?php the_title(); ?></span></h1>

    // combine as many as you like if the output is the same
    <?php elseif ( tribe_is_upcoming() || tribe_is_past() || tribe_is_map() || tribe_is_photo() || tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_photo() ) : ?>

    <h1 class=”h-landmark”><span>Finn friluftsskoler</span></h1>

    <?php endif; ?>

    @breadcrumbs:
    I tried adding your code like this:

    <?php if ( $breadcrumbs == '1' ) : ?>
                <?php if ( ! is_front_page() && ! x_is_portfolio() ) : ?>
                  <div class="x-breadcrumbs-wrap">
                    <?php x_breadcrumbs(); ?>
                  </div>
                <?php endif; ?>
    			<?php if ( tribe_is_event() && is_single() ) : ?>
    			  <div class="x-breadcrumbs"><a href="http://friluftsskole.no"><span class="home"><i class="x-icon-home" data-icon=""></i></span></a> <span class="delimiter"><i class="x-icon-angle-right" data-icon=""></i></span> <span class="current">Finn friluftsskoler</span></div>
                <?php endif; ?>
                
              <?php endif; ?>

    But it doesn’t work properly then. It doesn’t show on frilfutsskole.no/finn-skole and on single events it shows the home icon twice and doesn’t link back to the main calendar page.

    I also tried adding it seperatly below with this code:

    <?php if ( $breadcrumbs == '1' ) : ?>
    				<?php if ( tribe_is_event() && is_single() ) : ?>
    					<div class="x-breadcrumbs"><a href="http://friluftsskole.no"><span class="home"><i class="x-icon-home" data-icon=""></i></span></a> <span class="delimiter"><i class="x-icon-angle-right" data-icon=""></i></span> <span class="current">Finn friluftsskoler</span></div>
    				<?php endif; ?>
    			<?php endif; ?>

    But same results. See for yourself. It’s the last one that is in the code now.

    #966438
    Nico
    Member

    Hi T,

    Thanks for the follow up and your patience on this. Glad we could fix the title at least 🙂

    @Conditionals, can you try this one instead:

    // this should target all calendar related pages
    <?php elseif ( tribe_is_event_query() ) : ?>
    <h1 class=”h-landmark”><span>Finn friluftsskoler</span></h1>
    <?php endif; ?>

    Can you put this condition first? I think it shows “Nyheter” for single events because it fits in the is_single condition first.

    @Breadcrumbs, I’ve refactored the code, please give it a try. Updated gist is here.

    Looking forward to solving this, just let me know how these updated fixes go.
    Happy to help,
    Nico

    #966490

    The title is still “Nyheter” on single views. Breadcrumbs are now only the home icon and > on all the events calendar related pages.

    If the breadcrumbs problem is too difficult I can just disable breadcrumbs, they aren’t really that important. But I need the page title to show.

    #966503
    Nico
    Member

    Hi T,

    Thanks for your feedback once again. Let’s fix titles and if you can disable breadcrumbs that’ll be easier.

    Please confirm me that you’ve updated conditionals for the titles part. Also could you move the last conditional to the first place? The code should look like this:


    <?php if ( tribe_is_event_query() ) : ?>
    <h1 class=”h-landmark”><span>Finn friluftsskoler</span></h1>
    <?php elseif ( x_is_shop() || x_is_product() ) : ?>
    <h1 class=”h-landmark”><span><?php echo x_get_option( ‘x_renew_shop_title’ ); ?></span></h1>
    <?php elseif ( x_is_bbpress() ) : ?>
    //etc...

    Let me know if this works,
    Really looking forward to tackle this issue,
    Nico

    #966549

    Got “Finn friluftsskoler” showing on all event related pages now. Too bad about the breadcrumbs though :/

    Thanks for your help! 🙂

    #966832
    Nico
    Member

    T,

    Glad to hear we finally nailed Titles! Regarding breadcrumbs we can still try to get that right.

    Is the site using the latest version of the “breadcrumb fix”?

    https://gist.github.com/niconerd/80bc274bc037c9d52557

    If so and it still not working, can you share with me an URL to see that?

    Let me know,
    Nico

    #972580
    Nico
    Member

    Hey Torbjøn,

    Since there hasn’t been any activity on this thread for over 2 weeks I’m now closing it. Feel free to start a new thread if you have further issues.

    Best,
    Nico

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Events Calendar title and breadcrumbs not showing’ is closed to new replies.