Tagged: , , ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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,
    Roman

    #270279

    Hi 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,
    Josue

    #271210

    Hi 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,
    Roman

    #271370

    That normally happens when you paste the code directly from the mail message, the quotes get transformed into characters codes.

    Regards,
    Josue

    #272818

    Hi 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,
    Roman

    #272825

    Hi,

    Can you create me an administrator account? post it here as a private reply.

    Regards,
    Josue

    #272826
    This reply has been marked as private.
    #272873

    Hi!

    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!
    Josue

    #272874

    You are a hero.

    Thank you so much for the help.

    #272876

    You are welcome, glad we could help :)

    Regards,
    
Josue

    #275503

    Hi 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
    Michael

    #275524

    Hey!

    In wp-content/themes/enfold/index.php and wp-content/themes/enfold/single.php

    Best regards,
    Peter

    #275538

    Simple as that ;-) Thanks Dude!

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Blog related questions’ is closed to new replies.