How can I display the page title "Event"?

Home Forums Calendar Products Events Calendar PRO How can I display the page title "Event"?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1108964
    fifteen15studios
    Participant

    Hi 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!
    Brendan

    #1108965
    fifteen15studios
    Participant

    This reply is private.

    #1108987
    Andras
    Keymaster

    Hello 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,
    Andras

    #1114598
    Support Droid
    Keymaster

    This 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How can I display the page title "Event"?’ is closed to new replies.