• Hi there,

    How do I remove the “|” on the title for the main page but keep want the rest of the pages to look the same.

    Now:
    “| Spin or Bin Music Blog”
    “About | Spin or Bin Music Blog”

    Desired:
    “Spin or Bin Music Blog”
    “About | Spin or Bin Music Blog”

    This is the title tag:
    <title><?php if (is_single() || is_page() || is_archive()) { wp_title(”,true); } else { bloginfo(‘description’); } ?> | <?php bloginfo(‘name’); ?></title>

    Blog: https://spinorbinmusic.com/
    Any help is appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try some thing like using strpos(); to check if the pipe (|) character is at position 1. If it is don’t echo it.

    Thread Starter spinorbinmusic

    (@spinorbinmusic)

    sorry, dun really understand how to do it. could it explain further, please? thanks much!

    Thread Starter spinorbinmusic

    (@spinorbinmusic)

    anyone else can help with this? much appreciated!

    I could be wrong but, it looks like you don’t have anything set for a blog description. If that’s true, just remove the “|” before the php bloginfo(‘name’); inside the title tags.

    Thread Starter spinorbinmusic

    (@spinorbinmusic)

    But how do I correct the title to look like this:

    Now:
    “| Spin or Bin Music Blog”
    “About | Spin or Bin Music Blog”

    Desired:
    “Spin or Bin Music Blog”
    “About | Spin or Bin Music Blog”

    If I were to remove the “|” before the php bloginfo(‘name’), I would be getting “About Spin or Bin Music Blog”

    Seems tricky to me…anyone else can help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Blog Title’ is closed to new replies.