Jonny S
Forum Replies Created
-
AuthorPosts
-
anyone?
Thanks Giri, appreciated!
This 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
So 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;
}Thanks for the css. Where do I paste this code you provided earlier? define(‘CODE_SNIPPETS_SAFE_MODE’, true);
1 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.
Yes that’s exactly what I wanted, thanks. Are you able to tell me how to move the titles down by 40px?
This is the error message I am getting
The code snippet you are trying to save produced a fatal error on line 98:
Cannot redeclare kleo_title() (previously declared in /home/cluster-sites/10857/t/test-trailscotland.co.uk/public_html/wp-content/themes/kleo-child/functions.php:14)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
Hi, I tried that code but it resulted in the following error – The code snippet you are trying to save produced a fatal error on line 98:
This reply has been marked as private.Hi, I cant seem to get rid of the Archive For: text. Changing the post type page meta settings doesn’t seem to be doing anything.
Anyone?
Yes I am trying to remove the archive for text. I would also like the title moved down by about 40px.
Yep that’s exactly what i’ve been doing….. Thanks for your help!
I should have the advanced search for bike shop working now?
I tried changing the customise my search text but it’s reverted back to the button with the cog. Why does that keep happening?
-
AuthorPosts