robbieboy

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Venues not showing in List or Photo views #1548714
    robbieboy
    Participant

    Thanks for the quick response! My bad on the list view. That was an old template we were using. I’ve removed the customization there and the event shows.

    I grabbed the venue code out of the stock list single-event.php and created a custom template for the photo template in my themes directory. All is good now, thanks for your help! Here’s what I ended up with for single-event.php in photos incase anyone is interested:

    <?php
    /**
     * Photo View Single Event
     * This file contains one event in the photo view
     *
     * Override this template in your own theme by creating a file at [your-theme]/tribe-events/pro/photo/single-event.php
     *
     * @package TribeEventsCalendar
     * @version 4.4.8
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	die( '-1' );
    } ?>
    
    <?php
    
    global $post;
    ///// START CUSTOM TO SHOW VENUE 
    // Setup an array of venue details for use later in the template
    $venue_details = tribe_get_venue_details();
    
    // The address string via tribe_get_venue_details will often be populated even when there's
    // no address, so let's get the address string on its own for a couple of checks below.
    $venue_address = tribe_get_address();
    
    // Venue
    $has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
    
    // Organizer
    $organizer = tribe_get_organizer();
    ///// END CUSTOM TO SHOW VENUE
    ?>
    
    <div class="tribe-events-photo-event-wrap">
    
    	<?php echo tribe_event_featured_image( null, 'medium' ); ?>
    
    	<div class="tribe-events-event-details tribe-clearfix">
    
    		<!-- Event Title -->
    		<?php do_action( 'tribe_events_before_the_event_title' ); ?>
    		<h2 class="tribe-events-list-event-title">
    			<a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title() ?>" rel="bookmark">
    				<?php the_title(); ?>
    			</a>
    		</h2>
    		<?php do_action( 'tribe_events_after_the_event_title' ); ?>
    
    		<!-- Event Meta -->
    		<?php do_action( 'tribe_events_before_the_meta' ); ?>
    		<div class="tribe-events-event-meta">
    			<div class="tribe-event-schedule-details">
    				<?php if ( ! empty( $post->distance ) ) : ?>
    					<strong> [<?php echo tribe_get_distance_with_unit( $post->distance ); ?>]</strong>
    				<?php endif; ?>
    				<?php echo tribe_events_event_schedule_details(); ?>
    			</div>
    		</div><!-- .tribe-events-event-meta -->
    		<!-- START CUSTOM TO SHOW VENUE -->
    		<?php if ( $venue_details ) : ?>
    			<!-- Venue Display Info -->
    			<div class="tribe-events-venue-details">
    			<?php
    				$address_delimiter = empty( $venue_address ) ? ' ' : ', ';
    
    				// These details are already escaped in various ways earlier in the process.
    				echo implode( $address_delimiter, $venue_details );
    
    				if ( tribe_show_google_map_link() ) {
    					echo tribe_get_map_link_html();
    				}
    			?>
    			</div> <!-- .tribe-events-venue-details -->
    		<?php endif; ?>
    		<!-- END CUSTOM TO SHOW VENUE -->
    		<?php do_action( 'tribe_events_after_the_meta' ); ?>
    
    		<!-- Event Content -->
    		<?php do_action( 'tribe_events_before_the_content' ); ?>
    		<div class="tribe-events-list-photo-description tribe-events-content">
    			<?php echo tribe_events_get_the_excerpt() ?>
    		</div>
    		<?php do_action( 'tribe_events_after_the_content' ) ?>
    
    	</div><!-- /.tribe-events-event-details -->
    
    </div><!-- /.tribe-events-photo-event-wrap -->
    
    robbieboy
    Participant

    Hi Jaime,

    I did a little more research and found a thread that helped with a solution to this problem (Post from Ben). I’m running a CPO Theme and I suspect anyone else running CPO Themes will have the same issue. To solve I had to modify two functions in the theme’s markup.php file. This isn’t ideal as these changes may be overwritten if we update the theme, but this works for all of the views I’m using. I can’t get the code tags to work. See below:

    `if(!function_exists(‘cpotheme_page_title’)){
    function cpotheme_page_title(){
    global $post;
    if(isset($post->ID)) $current_id = $post->ID; else $current_id = false;
    $title_tag = function_exists(‘is_woocommerce’) && is_woocommerce() && is_singular(‘product’) ? ‘span’ : ‘h1’;

        echo '';
        if(function_exists('is_woocommerce') &amp;&amp; is_woocommerce()){
            woocommerce_page_title();
        }elseif(is_category() || is_tag() || is_tax()){
            single_tag_title('', true);
        }elseif(is_author()){
            the_author();
        }elseif(is_date()){
            _e('Archive', 'allegiant');
        }elseif(is_404()){
            echo __('Page Not Found', 'allegiant');
        }elseif(is_search()){
            echo __('Search Results for', 'allegiant').' "'.get_search_query().'"';
        } else if ( function_exists('tribe_is_month') &amp;&amp; tribe_is_month() ) {
                echo 'Events Calendar'; 
        } else if ( function_exists('tribe_is_list_view') &amp;&amp; tribe_is_list_view() ) {
                echo 'Events Calendar'; 
        } else if ( function_exists('tribe_is_photo') &amp;&amp; tribe_is_photo() ) {
                echo 'Events Calendar'; 
        }else{
            echo get_the_title($current_id);
        }
        echo '';
    }
    

    }

    if(!function_exists(‘cpotheme_breadcrumb’)){
    function cpotheme_breadcrumb($display = false){
    if(!is_home() && !is_front_page()){
    //Use WooCommerce navigation if it’s a shop page
    if(function_exists(‘is_woocommerce’) && function_exists(‘woocommerce_breadcrumb’) && is_woocommerce()){
    woocommerce_breadcrumb();
    return;
    }

            $result = '';
            if(function_exists('yoast_breadcrumb')){
                $result = yoast_breadcrumb('','', false);
            }
    
            if($result == ''){
                global $post;
                if(is_object($post)) $pid = $post-&gt;ID; else $pid = '';
                $result = '';
    
                if($pid != ''){
                    $result = "<span class='breadcrumb-separator'></span>";
                    //Add post hierarchy
                    if(is_singular()):
                        $post_data = get_post($pid);
                        $result .= "<span class='breadcrumb-title'>".apply_filters('the_title', $post_data-&gt;post_title)."</span>\n";
                        //Add post hierarchy
                        while($post_data-&gt;post_parent):
                            $post_data = get_post($post_data-&gt;post_parent);
                            $result = "<span class='breadcrumb-separator'></span><a class='breadcrumb-link'>ID)."'&gt;".apply_filters('the_title', $post_data-&gt;post_title)."</a>\n".$result;
                        endwhile;
    
                    elseif(is_tax()):
                        $result .= single_tag_title('', false);
    
                    elseif(is_author()):
                        $author = get_userdata(get_query_var('author'));
                        $result .= $author-&gt;display_name;
    
                    //Prefix with a taxonomy if possible
                    elseif(is_category()):                  
                        $post_data = get_the_category($pid);
                        if(isset($post_data[0])):
                            $data = get_category_parents($post_data[0]-&gt;cat_ID, TRUE, ' » ');
                            if(!is_object($data)):
                                $result .= substr($data, 0, -8);
                            endif;
                        endif;
    
                    elseif(is_search()):                    
                        $result .= __('Search Results', 'allegiant');
                    else:
                        if(isset($post-&gt;ID)) $current_id = $post-&gt;ID; else $current_id = false;
                        if($current_id){
                            $result .= get_the_title($current_id);
                        }
                    endif;
                }elseif(is_404()){
                    $result = "<span class='breadcrumb-separator'></span>";
                    $result .= __('Page Not Found', 'allegiant');
                }
                if (( function_exists('tribe_is_month') &amp;&amp; tribe_is_month() ) ||
                ( function_exists('tribe_is_list_view') &amp;&amp; tribe_is_list_view() ) ||
                ( function_exists('tribe_is_photo') &amp;&amp; tribe_is_photo() )) {
                        $result = '<span class="breadcrumb-separator"></span><a class="breadcrumb-link" href="/events/">Events Calendar</a>';
                }
                $result = '<a class="breadcrumb-link" href="'.home_url().'">'.__('Home', 'allegiant').'</a>'.$result;
            }
    
            $output = '<div id="breadcrumb" class="breadcrumb">'.$result.'</div>';
            echo $output;
        }
    }
    

    }`

    robbieboy
    Participant

    Hi Jaime,

    I did a little more research and found a thread that helped with a solution to this problem (Post from Ben). I’m running a CPO Theme and I suspect anyone else running CPO Themes will have the same issue. To solve I had to modify two functions in the theme’s markup.php file. This isn’t ideal as these changes may be overwritten if we update the theme, but this works for all of the views I’m using. Sorry I can’t get the code tags to work. See below:

    `if(!function_exists(‘cpotheme_page_title’)){
    function cpotheme_page_title(){
    global $post;
    if(isset($post->ID)) $current_id = $post->ID; else $current_id = false;
    $title_tag = function_exists(‘is_woocommerce’) && is_woocommerce() && is_singular(‘product’) ? ‘span’ : ‘h1’;

        echo '';
        if(function_exists('is_woocommerce') &amp;&amp; is_woocommerce()){
            woocommerce_page_title();
        }elseif(is_category() || is_tag() || is_tax()){
            single_tag_title('', true);
        }elseif(is_author()){
            the_author();
        }elseif(is_date()){
            _e('Archive', 'allegiant');
        }elseif(is_404()){
            echo __('Page Not Found', 'allegiant');
        }elseif(is_search()){
            echo __('Search Results for', 'allegiant').' "'.get_search_query().'"';
        } else if ( function_exists('tribe_is_month') &amp;&amp; tribe_is_month() ) {
                echo 'Events Calendar'; 
        } else if ( function_exists('tribe_is_list_view') &amp;&amp; tribe_is_list_view() ) {
                echo 'Events Calendar'; 
        } else if ( function_exists('tribe_is_photo') &amp;&amp; tribe_is_photo() ) {
                echo 'Events Calendar'; 
        }else{
            echo get_the_title($current_id);
        }
        echo '';
    }
    

    }

    if(!function_exists(‘cpotheme_breadcrumb’)){
    function cpotheme_breadcrumb($display = false){
    if(!is_home() && !is_front_page()){
    //Use WooCommerce navigation if it’s a shop page
    if(function_exists(‘is_woocommerce’) && function_exists(‘woocommerce_breadcrumb’) && is_woocommerce()){
    woocommerce_breadcrumb();
    return;
    }

            $result = '';
            if(function_exists('yoast_breadcrumb')){
                $result = yoast_breadcrumb('','', false);
            }
    
            if($result == ''){
                global $post;
                if(is_object($post)) $pid = $post-&gt;ID; else $pid = '';
                $result = '';
    
                if($pid != ''){
                    $result = "<span class='breadcrumb-separator'></span>";
                    //Add post hierarchy
                    if(is_singular()):
                        $post_data = get_post($pid);
                        $result .= "<span class='breadcrumb-title'>".apply_filters('the_title', $post_data-&gt;post_title)."</span>\n";
                        //Add post hierarchy
                        while($post_data-&gt;post_parent):
                            $post_data = get_post($post_data-&gt;post_parent);
                            $result = "<span class='breadcrumb-separator'></span><a class='breadcrumb-link'>ID)."'&gt;".apply_filters('the_title', $post_data-&gt;post_title)."</a>\n".$result;
                        endwhile;
    
                    elseif(is_tax()):
                        $result .= single_tag_title('', false);
    
                    elseif(is_author()):
                        $author = get_userdata(get_query_var('author'));
                        $result .= $author-&gt;display_name;
    
                    //Prefix with a taxonomy if possible
                    elseif(is_category()):                  
                        $post_data = get_the_category($pid);
                        if(isset($post_data[0])):
                            $data = get_category_parents($post_data[0]-&gt;cat_ID, TRUE, ' » ');
                            if(!is_object($data)):
                                $result .= substr($data, 0, -8);
                            endif;
                        endif;
    
                    elseif(is_search()):                    
                        $result .= __('Search Results', 'allegiant');
                    else:
                        if(isset($post-&gt;ID)) $current_id = $post-&gt;ID; else $current_id = false;
                        if($current_id){
                            $result .= get_the_title($current_id);
                        }
                    endif;
                }elseif(is_404()){
                    $result = "<span class='breadcrumb-separator'></span>";
                    $result .= __('Page Not Found', 'allegiant');
                }
                if (( function_exists('tribe_is_month') &amp;&amp; tribe_is_month() ) ||
                ( function_exists('tribe_is_list_view') &amp;&amp; tribe_is_list_view() ) ||
                ( function_exists('tribe_is_photo') &amp;&amp; tribe_is_photo() )) {
                        $result = '<span class="breadcrumb-separator"></span><a class="breadcrumb-link" href="/events/">Events Calendar</a>';
                }
                $result = '<a class="breadcrumb-link" href="'.home_url().'">'.__('Home', 'allegiant').'</a>'.$result;
            }
    
            $output = '<div id="breadcrumb" class="breadcrumb">'.$result.'</div>';
            echo $output;
        }
    }
    

    }`

    • This reply was modified 8 years, 1 month ago by robbieboy.
    • This reply was modified 8 years, 1 month ago by robbieboy.
    • This reply was modified 8 years, 1 month ago by robbieboy.
    robbieboy
    Participant

    When I reset the theme the title at the top of the event calendar page says the main wordpress title of the site. Shouldn’t it say “Events Calendar” or something more intuitive? What is the title of the event calendar supposed to be?

    Thanks,
    Rob

    robbieboy
    Participant

    Hi there,
    You can see the issue here:
    http://www.edmontonpride.ca/events/

    Right now it’s showing the event name in the page heading rather than a page title.

    Thanks,
    Rob

    robbieboy
    Participant

    Hi there, thanks for getting back so quick.

    I updated the plugins and the problem persisted. When I changed to the
    twenty seventeen theme, it just shows the name of the website instead of
    the page:

    Here’s what it’s looking like normally:

Viewing 6 posts - 1 through 6 (of 6 total)