Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1085501
    tabasko
    Participant

    Dear support,

    my front page shows this Seperator line ‘|’ after name of the whole blog.
    Like this: “Blog name |”
    On all other pages it is like this: “post name | blog name”

    How do I get rid of this seperator on the front page?

    Thank you and best regards,
    tabasko

    #1086180
    Friech
    Moderator

    Hi There,

    Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add this on your child theme’s functions.php file.

    if ( ! function_exists( 'x_wp_title' ) ) :
      function x_wp_title( $title ) {
    
        if ( is_front_page() ) {
          return get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' );
        } elseif ( is_feed() ) {
          return ' | RSS Feed';
        } else {
          return trim( $title ) . '  ' . get_bloginfo( 'name' ); 
        }
    
      }
      add_filter( 'wp_title', 'x_wp_title' );
    endif;
    

    Hope it helps, Cheers!

    #1086289
    tabasko
    Participant

    Thank you Friech, this helped a lot.
    For what I wanted I adjusted the code like this:

    if ( ! function_exists( 'x_wp_title' ) ) :
      function x_wp_title( $title ) {
    
        if ( is_front_page() ) {
          return get_bloginfo( 'name' ); // . ' | ' . get_bloginfo( 'description' );
        } elseif ( is_feed() ) {
          return ' | RSS Feed';
        } else {
          return trim( $title ) . ' | ' . get_bloginfo( 'name' ); 
        }
    
      }
      add_filter( 'wp_title', 'x_wp_title' );
    endif;
    #1086460
    Lely
    Moderator

    You’re welcome!

    Thank you for sharing your code adjustment.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1085501 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>