Event Calendar Page Shows Randomish Event Name As Page Heading

Home Forums Calendar Products Events Calendar PRO Event Calendar Page Shows Randomish Event Name As Page Heading

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1467713
    robbieboy
    Participant

    Hi there, on my event calendar page the HTML title is: Upcoming Events – Edmonton Pride Fesitval Society
    But, the actual H1 Heading at the top of the page shows the title of the most recent event when the page loads. If I change the filter so that event isn’t listed, the H1 title still shows that event name. The breadcrumb also show the name of this event.

    How do I change this so that the H1 shows the same as the tag does?</p> <p>Thanks.

    #1468551

    Hi Rob,

    Thanks so much for reaching out!

    As a first troubleshooting step, can you update all of your Events Calendar related plugins and see if this issue still occurs?

    If it does, do you see the same issue if you switch to a default WordPress theme, like ‘Twentyseventeen’?

    Let me know!

     

    Thanks,

    Jaime

    #1471797
    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:

    #1472002

    Hi Rob,

    I’m not seeing your screenshot here.  Would you mind re-attaching it?

    Let me know if you have any other questions in the meantime!

     

    Thanks,

    Jaime

    #1476523
    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

    #1477401

    Hi Rob,

    Does switching to a default WordPress theme resolve the issue?

    Also, you can try playing around with the stylesheets and page templates that you have set up and see if that changes the placement of your elements:

    https://theeventscalendar.com/knowledgebase/stylesheets-and-page-templates/

    Let me know if that helps!

     

    Thanks,

    Jaime

    #1478438
    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

    #1478455
    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.
    #1478461
    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;
        }
    }
    

    }`

    #1479025

    Hi Rob,

    Glad to hear that you are making some progress with this issue.  First off, I’d recommend creating a child theme for this customization so that your changes will not be lost when the theme needs to be updated.

    Secondly, since this has turned out to be a theme conflict, that is beyond the scope of support that we can provide, as per our support policy.

    If you do need further assistance with this issue, I’d recommend reaching out to your theme developers to see if they have any further advice.

    Otherwise, if this functionality is a requirement for your intended project, I’d suggest that a third-party developer would be the best way to make this feature happen on a short timeline. ? We maintain a list of developers who work with our plugins on our Knowledgebase here:

    https://theeventscalendar.com/knowledgebase/find-a-customizer/

    Let me know if you have any further questions for me!

     

    Thanks,

    Jaime

    #1497584
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Event Calendar Page Shows Randomish Event Name As Page Heading’ is closed to new replies.