Change title
This topic contains 25 replies, has 4 voices, and was last updated by Giri 8 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 3, 2017 at 12:02 pm #365083
.post-type-archive h1.page-title { margin-top: 30px; }
March 3, 2017 at 1:15 pm #3651041 more thing – when I go into my events tab the title of the page should be “Events” but for some reason it’s showing the title of the last event I have added. For example if you go to http://cluster10857.extendcp.uk/test-trailscotland.co.uk/events/ it shows the title as “The Eliminator” when it should just show Events.
March 3, 2017 at 1:31 pm #365109We had that problem earlier.
Refer this thread.
https://wpgeodirectory.com/support/topic/listing-page-h1/#post-306035
Thanks
March 3, 2017 at 2:22 pm #365142Thanks for the css. Where do I paste this code you provided earlier? define(‘CODE_SNIPPETS_SAFE_MODE’, true);
March 3, 2017 at 2:23 pm #365144You don’t need that.
That was needed only if you can’t able to access wp-admin because of code snippets
March 3, 2017 at 2:38 pm #365146So you want me to copy this into my functions.php file
function kleo_title()
{
$output = “”;if ( is_category() )
{
$output = __(”,’kleo_framework’).” “.single_cat_title(”,false);
}
elseif (is_day())
{
$output = __(‘Archive for date:’,’kleo_framework’).” “.get_the_time(‘F jS, Y’);
}
elseif (is_month())
{
$output = __(‘Archive for month:’,’kleo_framework’).” “.get_the_time(‘F, Y’);
}
elseif (is_year())
{
$output = __(‘Archive for year:’,’kleo_framework’).” “.get_the_time(‘Y’);
}
elseif (is_search())
{
global $wp_query;
if(!empty($wp_query->found_posts))
{
if($wp_query->found_posts > 1)
{
$output = $wp_query->found_posts .” “. __(‘search results for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
}
else
{
$output = $wp_query->found_posts .” “. __(‘search result for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
}
}
else
{
if(!empty($_GET[‘s’]))
{
$output = __(‘Search results for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
}
else
{
$output = __(‘To search the site please enter a valid term’,’kleo_framework’);
}
}}
elseif (is_author())
{
$curauth = (get_query_var(‘author_name’)) ? get_user_by(‘slug’, get_query_var(‘author_name’)) : get_userdata(get_query_var(‘author’));
$output = __(‘Author Archive’,’kleo_framework’).” “;if(isset($curauth->nickname)) $output .= __(‘for:’,’kleo_framework’).” “.$curauth->nickname;
}
elseif (is_tag())
{
$output = __(‘Tag Archive for:’,’kleo_framework’).” “.single_tag_title(”,false);
}
elseif(is_tax())
{
$term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
$output = __(”,’kleo_framework’).” “.$term->name;} elseif ( is_front_page() && !is_home() ) {
$output = get_the_title(get_option(‘page_on_front’));} elseif ( is_home() && !is_front_page() ) {
$output = get_the_title(get_option(‘page_for_posts’));} elseif ( is_404() ) {
$output = __(‘Error 404 – Page not found’,’kleo_framework’);
}
else {
if (geodir_is_page(‘listing’)) {
ob_start(); // Start buffering;
geodir_action_listings_title();
$title = ob_get_contents();
ob_end_clean();
$output = $title;
} elseif (geodir_is_page(‘author’)) {
ob_start(); // Start buffering;
geodir_action_author_page_title();
$title = ob_get_contents();
ob_end_clean();
$output = $title;
} else {
$output = get_the_title();
}
}if (isset($_GET[‘paged’]) && !empty($_GET[‘paged’]))
{
$output .= ” (“.__(‘Page’,’kleo_framework’).” “.$_GET[‘paged’].”)”;
}return $output;
}March 3, 2017 at 2:40 pm #365147Yes, But make sure to copy properly. If the quotes are converted like you posted above then you are gonna have bad time
March 3, 2017 at 3:08 pm #365166This may sound a bit stupid but what do you mean when you say I need to by copy it properly? Do I not just highlight it all then right click and press copy? I tried doing that and it resulted in the error I posted earlier. Are you able to do this for me? Thanks
March 3, 2017 at 3:12 pm #365167Done
March 3, 2017 at 7:05 pm #365207Thanks Giri, appreciated!
March 6, 2017 at 11:32 am #365582You are welcome Jonny.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket