Home › Forums › Calendar Products › Events Calendar PRO › Event Calendar Page Shows Randomish Event Name As Page Heading
- This topic has 11 replies, 2 voices, and was last updated 8 years, 1 month ago by
robbieboy.
-
AuthorPosts
-
March 1, 2018 at 1:59 pm #1467713
robbieboy
ParticipantHi 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? Thanks.
March 2, 2018 at 11:00 am #1468551Jaime Marchwinski
KeymasterHi 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
March 6, 2018 at 9:31 pm #1471797robbieboy
ParticipantHi 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:
March 7, 2018 at 5:07 am #1472002Jaime Marchwinski
KeymasterHi 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
March 12, 2018 at 7:42 am #1476523robbieboy
ParticipantHi 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,
RobMarch 13, 2018 at 5:46 am #1477401Jaime Marchwinski
KeymasterHi 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
March 13, 2018 at 7:52 pm #1478438robbieboy
ParticipantWhen 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,
RobMarch 13, 2018 at 8:41 pm #1478455robbieboy
ParticipantHi 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') && 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') && tribe_is_month() ) { echo 'Events Calendar'; } else if ( function_exists('tribe_is_list_view') && tribe_is_list_view() ) { echo 'Events Calendar'; } else if ( function_exists('tribe_is_photo') && 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->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->post_title)."</span>\n"; //Add post hierarchy while($post_data->post_parent): $post_data = get_post($post_data->post_parent); $result = "<span class='breadcrumb-separator'></span><a class='breadcrumb-link'>ID)."'>".apply_filters('the_title', $post_data->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->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]->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->ID)) $current_id = $post->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') && tribe_is_month() ) || ( function_exists('tribe_is_list_view') && tribe_is_list_view() ) || ( function_exists('tribe_is_photo') && 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; } }}`
March 13, 2018 at 8:46 pm #1478461robbieboy
ParticipantHi 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') && 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') && tribe_is_month() ) { echo 'Events Calendar'; } else if ( function_exists('tribe_is_list_view') && tribe_is_list_view() ) { echo 'Events Calendar'; } else if ( function_exists('tribe_is_photo') && 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->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->post_title)."</span>\n"; //Add post hierarchy while($post_data->post_parent): $post_data = get_post($post_data->post_parent); $result = "<span class='breadcrumb-separator'></span><a class='breadcrumb-link'>ID)."'>".apply_filters('the_title', $post_data->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->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]->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->ID)) $current_id = $post->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') && tribe_is_month() ) || ( function_exists('tribe_is_list_view') && tribe_is_list_view() ) || ( function_exists('tribe_is_photo') && 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; } }}`
March 14, 2018 at 9:06 am #1479025Jaime Marchwinski
KeymasterHi 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
April 5, 2018 at 9:35 am #1497584Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Event Calendar Page Shows Randomish Event Name As Page Heading’ is closed to new replies.
