Home › Forums › Calendar Products › Events Calendar PRO › How can I display the page title "Event"?
- This topic has 3 replies, 3 voices, and was last updated 9 years, 11 months ago by
Support Droid.
-
AuthorPosts
-
April 29, 2016 at 12:45 pm #1108964
fifteen15studios
ParticipantHi Modern Tribe,
How can I display the page title “Event” if I’m on the Events page or showing an Event? It doesn’t seem to be working quite right, though I can display a unique header for home, for posts, and for regular pages.
I’d like my home page to show nothing, my Posts page to show “News” (as well as all other pages within News), my Events page to show “Events” (as well as all independent events), and all other pages to display the assigned title. They’re all in the pink bar at the top. I’ll reply with a private response with exact URLs.
There’s probably a function for it but I’m not sure what it is. This is my code so far:
<?php if ( is_front_page() ) { // This is the blog posts index } else { $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); $regColor = "rgba(183,26,139,.1)"; #b71a8b $regColorBorder = "#b71a8b"; /*echo '<div style="background-color: '.$regColor.'; height: 82px; border-top: solid 2px '.$regColorBorder.'; border-bottom: solid 2px '.$regColorBorder.'; margin-top: 20px;">'; echo $feat_image; echo '</div>';*/ echo '<div class="titleBar">'; echo '<div class="titleBarImage"></div>'; if ( is_single() || is_page( 'Events' ) || is_home() ){ echo '<div class="titleBarTitle">News</div>'; } else { echo '<div class="titleBarTitle">'.the_title( $before, $after, $echo ).'</div>'; } echo '<img src="'.$feat_image.'" alt="" style="float: right;" />'; echo '</div>'; } ?>Thank you!
BrendanApril 29, 2016 at 12:45 pm #1108965fifteen15studios
ParticipantThis reply is private.
April 29, 2016 at 1:35 pm #1108987Andras
KeymasterHello Brendan,
Thanks for using the Events Calendar and I’m sorry you are having a problem with this.
Customizations are not really part of the support we provide. We have guides to help with customizations.
I would start by searching our knowledge base for a solution.
You can also try looking around in the documentation for the hooks you could use.
For example in this line:
if ( is_single() || is_page( 'Events' ) || is_home() ){you could try using ‘tribe_is_list_view‘, maybe that will get you closer.
Also our Themer’s Guide might be of some help.
Let me know if this gets you any further.
Cheers,
AndrasMay 14, 2016 at 9:35 am #1114598Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘How can I display the page title "Event"?’ is closed to new replies.
