-
AuthorPosts
-
May 26, 2014 at 4:06 pm #270134
Hello,
In the Theme settings under Blog Layout I have the Blog Post Date unchecked, nevertheless it shows the posting date on my homepage (http://www.robroek.net). When you click on the blog item the date is not shown, but I’d like the date to be shown nowhere.
Next to that the title of my blog page on the hompage says: ‘Blog – My adventures’, but when you open an item the title changes to: ‘Blog – Latest News’. Where can I control the title of the items shown on the page?
Hope you understand what I mean and you can help. Thanks in advance.
Regards,
RomanMay 26, 2014 at 11:00 pm #270279Hi Roman!
1. Add this to the Quick CSS:
time.date-container.minor-meta { display: none; } span.text-sep.text-sep-date { display: none; }
2. You can either hide in the Layout Options (“Title Bar Settings”) or if you want to put a custom text there, you can do it by adding this to the theme functions.php:
add_filter('avf_title_args', 'fix_single_post_title', 10, 2); function fix_single_post_title($args,$id) { if ( $args['title'] == 'Blog - Latest News' ) { $args['title'] = get_the_title($id); $args['link'] = get_permalink($id); $args['heading'] = 'h1'; } return $args; }
Regards,
JosueMay 28, 2014 at 3:57 pm #271210Hi Josue,
Thanks for the help.
First solution works fine. Second solution doesn’t really work for me. When I add this to the function.php file my site won’t load anymore (blank page) and when I change the Title Bar Settings not only the text but also the bar disapears.It’s okay for now though, dont really mind.
Thanks for the effort.
Regards,
RomanMay 28, 2014 at 7:19 pm #271370That normally happens when you paste the code directly from the mail message, the quotes get transformed into characters codes.
Regards,
JosueMay 31, 2014 at 8:00 pm #272818Hi Josue,
Thanks for your response.
I copy/paste the code into notepad first and compare it to the code you’ve mailed me. Then I paste it in the functions.php (not the enfold-functions.php) but the website remains blank after that and I have to remove the code from the .php file again.
Hiding the title bar is not an option for me.
Is there an alternative?
Thanks.
Regards,
RomanMay 31, 2014 at 8:31 pm #272825Hi,
Can you create me an administrator account? post it here as a private reply.
Regards,
JosueMay 31, 2014 at 8:39 pm #272826This reply has been marked as private.June 1, 2014 at 1:00 am #272873Hi!
I added the function successfully and now the blog title appears there:
http://www.robroek.net/bureau-central/If you want to change that simply modify the values in the functions.php file, for example:
add_filter('avf_title_args', 'fix_single_post_title', 10, 2); function fix_single_post_title($args,$id) { if ( $args['title'] == 'Blog - Laatste Nieuws' ) { $args['title'] = 'Custom Title'; // <-- Title $args['link'] = 'http://kriesi.at'; // <-- Link $args['heading'] = 'h1'; } return $args; }
Cheers!
JosueJune 1, 2014 at 1:04 am #272874You are a hero.
Thank you so much for the help.
June 1, 2014 at 1:07 am #272876You are welcome, glad we could help :)
Regards,
JosueJune 6, 2014 at 10:36 am #275503Hi Josue,
I extendet the filter to display the title based on the category the post is in:
// Change the Blog Title based on the category the post is in add_filter('avf_title_args', 'fix_single_post_title', 10, 2); function fix_single_post_title($args,$id) { if ( $args['title'] == 'Blog - Die aktuellsten Neuigkeiten' && in_category ('termine')) { $args['title'] = 'Termine'; // <-- Title $args['link'] = ''; // <-- Link $args['heading'] = 'h2'; } elseif ( $args['title'] == 'Blog - Die aktuellsten Neuigkeiten' && in_category ('news')) { $args['title'] = 'News'; // <-- Title $args['link'] = ''; // <-- Link $args['heading'] = 'h2'; } return $args; }
By the way: Where is the default title defined?
Cheers
MichaelJune 6, 2014 at 11:54 am #275524Hey!
In wp-content/themes/enfold/index.php and wp-content/themes/enfold/single.php
Best regards,
PeterJune 6, 2014 at 12:23 pm #275538Simple as that ;-) Thanks Dude!
-
AuthorPosts
- The topic ‘Blog related questions’ is closed to new replies.