Home › Forums › Calendar Products › Events Calendar PRO › Events Calendar title and breadcrumbs not showing
- This topic has 13 replies, 2 voices, and was last updated 8 years, 11 months ago by Nico.
-
AuthorPosts
-
May 28, 2015 at 4:30 am #965584Torbjøn Bergwitz LauenParticipant
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?
May 28, 2015 at 9:44 am #965724NicoMemberHi 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,
NicoMay 28, 2015 at 3:39 pm #965891Torbjøn Bergwitz LauenParticipantThis reply is private.
May 29, 2015 at 10:13 am #966036NicoMemberHi 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,
NicoMay 29, 2015 at 10:30 am #966042Torbjøn Bergwitz LauenParticipantWell, 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…
May 29, 2015 at 11:57 am #966079NicoMemberTorbjø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,
NicoMay 29, 2015 at 12:08 pm #966094NicoMemberSorry 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,
NicoMay 29, 2015 at 2:47 pm #966168Torbjøn Bergwitz LauenParticipant@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.
June 1, 2015 at 11:38 am #966438NicoMemberHi 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,
NicoJune 1, 2015 at 3:34 pm #966490Torbjøn Bergwitz LauenParticipantThe 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.
June 1, 2015 at 5:22 pm #966503NicoMemberHi 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,
NicoJune 2, 2015 at 2:08 am #966549Torbjøn Bergwitz LauenParticipantGot “Finn friluftsskoler” showing on all event related pages now. Too bad about the breadcrumbs though :/
Thanks for your help! 🙂
June 3, 2015 at 3:46 am #966832NicoMemberT,
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,
NicoJune 24, 2015 at 7:40 am #972580NicoMemberHey 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 -
AuthorPosts
- The topic ‘Events Calendar title and breadcrumbs not showing’ is closed to new replies.