Home › Forums › Calendar Products › Events Calendar PRO › Event Category Title in calendar list view
- This topic has 15 replies, 2 voices, and was last updated 11 years ago by
Geoff.
-
AuthorPosts
-
April 6, 2015 at 11:24 am #953490
meredy
ParticipantWhen I link to a calendar (list view), I can title that list however I like–but–if I link to a specific category, the same title shows at the top –so there is nothing to distinguish that you’re looking at only one category of events (not all events). Is there a way to have the category title appear at the top instead of the general “Title” for all events?
April 6, 2015 at 12:10 pm #953503Geoff
MemberHi there, meredy! Welcome back and nice to see you again. š
The category title should certainly display above the page title, typically in this format:
Upcoming Events > Category Name
Are you by chance using a custom template here, or have you made any customizations that may be preventing that title from displaying?
If so, you may need to either remove those, or customize further to include the category name about the month with something like this in the template:
<h2 class="tribe-events-page-title"><?php echo tribe_get_events_title() ?></h2>Please let me know if this helps steer things in the right direction. š
Cheers!
GeoffApril 6, 2015 at 1:28 pm #953526meredy
ParticipantWell hmmm. I think I am using your default template but the theme (church & event) seems to put a few add ons into it as well.
Is this your stuff?
Basic Template SettingsDefault Events Template
This is where I get the problem–if I disable this next line, no title shows up.
Is this the themes problem to solve?
_________________________________
Disable the Event Search Bar
Check this to use the classic header.
____________________________________April 6, 2015 at 1:33 pm #953529meredy
ParticipantI can send a screen shot if that would help??
April 6, 2015 at 3:25 pm #953559Geoff
MemberHi meredy!
Good questions. Yes, those are indeed our settings. Did the theme come packaged with The Events Calendar? If you go into the theme directory, do you happen to see a folder in there calledĀ tribe-events?
Thanks!
GeoffApril 6, 2015 at 6:28 pm #953600meredy
Participantyes and it has a default-template.php with this code:
<?php
/**
* Default Events Template
* This file is the basic wrapper template for all the views if ‘Default Events Template’
* is selected in Events -> Settings -> Template -> Events Template.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc.
*
*/if ( !defined(‘ABSPATH’) ) { die(‘-1’); }
if ( ! is_singular() ) {
$title = tribe_get_events_title(false);
}get_header(); ?>
<div class=”row page-wrapper”>
<?php WpvTemplates::left_sidebar() ?>
<article <?php post_class(WpvTemplates::get_layout()) ?>>
<?php tribe_events_before_html(); ?>
<?php tribe_get_view(); ?>
<?php tribe_events_after_html(); ?>
</article>
<?php WpvTemplates::right_sidebar() ?><?php if(has_action(‘wpv_tribe_events_after_sidebars-1’) || has_action(‘wpv_tribe_events_after_sidebars-2’)): ?>
</div><!– .page-wrapper –>
</div><!– .limit-wrapper –><?php if(has_action(‘wpv_tribe_events_after_sidebars-1’)): ?>
<div class=”clearfix single-event-after-sidebars-1″>
<?php do_action(‘wpv_tribe_events_after_sidebars-1’) ?>
</div>
<?php endif ?>
<?php if(has_action(‘wpv_tribe_events_after_sidebars-2’)): ?>
<div class=”clearfix single-event-after-sidebars-2″>
<div class=”limit-wrapper”>
<?php do_action(‘wpv_tribe_events_after_sidebars-2’) ?>
</div>
</div>
<?php endif ?><div><div> <!– dummy tags –>
<?php endif ?>
</div>
<?php get_footer(); ?>April 6, 2015 at 6:32 pm #953603meredy
Participantand also has this in it:
<?php
/**
* List View Loop
* This file sets up the structure for the list loop
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/loop.php
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc.
*
*/if ( !defined(‘ABSPATH’) ) { die(‘-1’); } ?>
<?php
$GLOBALS[‘more’] = false;$GLOBALS[‘wpv_pretty_tribe_date_headers’] = true;
$GLOBALS[‘wpv_pretty_tribe_date_headers_first’] = true;
?><div class=”tribe-events-loop hfeed vcalendar clearfix”>
<?php while ( have_posts() ) : the_post(); ?>
<?php do_action( ‘tribe_events_inside_before_loop’ ); ?><?php tribe_events_list_the_date_headers(); ?>
<!– Event –>
<div id=”post-<?php the_ID() ?>” class=”<?php tribe_events_event_classes() ?>”>
<?php tribe_get_template_part( ‘list/single’, ‘event’ ) ?>
</div><!– .hentry .vevent –><?php do_action( ‘tribe_events_inside_after_loop’ ); ?>
<?php $GLOBALS[‘wpv_pretty_tribe_date_headers_first’] = false; ?>
<?php endwhile; ?></section>
</div><!– .tribe-events-loop –>
April 6, 2015 at 6:34 pm #953604meredy
ParticipantIs something in one of these files messing with the Title and category header?
April 7, 2015 at 7:14 am #953693Geoff
MemberHi there meredy!
Excellent–yes, these are overrides of the default templates that come with the plugin. If you didn’t create those, then it would appear that the theme author did.
I believeĀ default-template.php is the one we’re going to want to focus on more here, though both have their fair share of customizations.
I do see one part in there that turns off theĀ tribe_get_events_title(). Perhaps you can try turning it on:
if ( ! is_singular() ) { $title = tribe_get_events_title(true); }Does that have an effect? Let me know and if it doesn’t, we might have to turn to the theme author.
Cheers!
GeoffApril 7, 2015 at 8:35 am #953730meredy
Participanttried that reset to true–no effect at all ??
April 7, 2015 at 9:01 am #953735Geoff
MemberHmm, how about adding the title in the template, just after the page wrapper:
<h2 class="tribe-events-page-title"><?php echo tribe_get_events_title() ?></h2>Geoff
April 7, 2015 at 10:24 am #953777meredy
Participantnope — did not work. Maybe I will get a response from theme people–been waiting 24 hrs for it now. Maybe not such a great theme afterall…sigh
April 7, 2015 at 5:04 pm #953895Geoff
MemberUgh, sorry about that meredy! Please do keep me posted here (I’ll leave this thread open a while) and let me know if something comes back. I’ll also look over this a little more to see if I can offer any more ideas.
Cheers!
GeoffApril 18, 2015 at 12:06 pm #956480meredy
ParticipantHi its ne again–well after a week of back and forth with no result I got this response from Vandam (theme people)
___________________________________________________________
“What I did is I changed line 183 in vamtam/classes/templates.php to this:if ( is_null($post_id) || ! is_singular() || WpvFancyPortfolio::has( ‘page’ ) )
The ! is_singular() part has been added.
Please note that this results in a title layout which is the same as the one we have here: http://church-event.vamtam.com/events/
– Regarding the category – you can see that no category is displayed even if you remove the text from “Upcoming Events Title” in Vamtam/General/Posts (this disables our code which overrides the events listing title and uses the plugin’s tribe_get_events_title() function).”
_____________________________________________________________________________
So now I get the upcoming events title but no category–got a fix??April 20, 2015 at 9:01 am #956738Geoff
MemberHi there meredy!
Thanks for following up here and sorry for the continued trouble. I know it can feel like spinning wheels at times, but hopefully we can get to the bottom of it.
Just to confirm: are you running the latest versions of both The Events Calendar (3.9.1) and The Events Calendar PRO (3.9.2)? Just want to make sure everything we’re troubleshooting is in sync. š
I see that the theme author added this to the classes/templates.php file:
if ( is_null($post_id) || ! is_singular() || WpvFancyPortfolio::has( āpageā ) )…however, I’m not sure that would change what is being called in the customizedĀ default-template.php file:
`if ( ! is_singular() ) {
$title = tribe_get_events_title(false);
}’It does certainly seem like the core issue here is with a customization within the theme. For example, if you activate a default WordPress theme (like Twenty Fifteen), does the category display? I would imagine it does.
Cheers!
Geoff -
AuthorPosts
- The topic ‘Event Category Title in calendar list view’ is closed to new replies.
