Okay
  Public Ticket #3447370
Small bug in "blog-template-functions.php"
Closed

Comments

  •  15
    hahni started the conversation

    This function allows to use some filters - a great option in kalium theme compared to other ones.

    One filter is called "kalium_blog_page_heading_replace_for_taxonomies_separator" and it allows to replace the built in separator " / " with custom value. But your function builds the title string with spaces and if changing the built in separator from " / " to ": " it results in "Tag_:_tagname" for example but it should be "Tag:_tagname".

    I found some other shortcomings in this file but perhaps this is some doing for the next update?

    Regards André

  •  15
    hahni replied

    I added the modified file here for explanation (changed file extension from php to txt) with some screenshots.

    Regards André


    Attached files:  Screenshot (238).png
      Screenshot (239).png
      Screenshot (240).png
      blog-template-functions.txt

  • [deleted] replied

    Hi Andre,

    Thank you for your suggestions.

    This function "kalium_blog_page_header" is a template function and can be entirely replaced for your own needs. You may declare it in child theme and it will override default one.

    However if you don't want to interfere the logic you may explicitly change the title in template:

    add_filter( 'kalium_get_template-templates/global/page-heading.php', function( $args ) {
        if ( is_year() ) {
            $args['title'] = strip_tags( $args['title'], 'span' );
        } else if ( is_tag() ) {
            // Other modifications...
        }
        
        return $args;
    } );

    This way you will ensure minimum modifications while achieving the desired result.

    Hopefully this works for you.

  •  15
    hahni replied

    Hi Art

    thanks for your more global suggestions. Perhaps you have seen that i've done that with a modified filter and it works great. I attached the filter example for other users as TXT.

    Thanks Regards André and you could close it now.