WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Hyphen After Site Name (8 posts)

  1. theidentityshift
    Member
    Posted 2 years ago #

    Hello,

    For some reason, there is a hyphen that appears after my site name in the browser tab. I have looked at other posts on this forum, but only found posts on hyphens before the site name. None of the suggestions worked for me.

    My site is http://theidentityshift.com/

    Thank you for your help!

    mario

  2. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    It is that way in the site title in the source code, <title>The Identity Shift - </title>

    Either in your wp settings you have it like that or in an SEO plugin if you are using one. Look in the dashboard, settings, general.

  3. theidentityshift
    Member
    Posted 2 years ago #

    I did check the settings, its not that. It must be in my SEO plugin. Any idea how I change that?

  4. ClaytonJames
    Member
    Posted 2 years ago #

    While your SEO plugin may ultimately have some affect on the appearance of the title, it looks like the hyphen being used as a separator is being defined in /response/core/actions/header-actions.php starting on line 91.

    The opening and closing title tags appear at lines 105 and 146 respectively, and it looks like the separator (hyphen) is referenced several times between those tags.

    Example: echo ' - ';

    [edit] if you left your site tag line blank in general settings, I think that might explain the title and the hyphen only, when on your front page.

  5. theidentityshift
    Member
    Posted 2 years ago #

    Thanks!

    So do i need to just delete the hyphen everywhere it occurs between line 91 and 146? I have a tag in the tag line, so I'm guessing I need to just manually remove the hyphen?

    Also I'm having trouble locating /response/core/actions/header-actions.php is it in the editor? I can't seem to find it.

    Thanks.

  6. ClaytonJames
    Member
    Posted 2 years ago #

    Also I'm having trouble locating /response/core/actions/header-actions.php is it in the editor? I can't seem to find it.

    You won't be able to use the built in editor on the file because it's located in a sub-directory of the theme. You will have to use your ftp client or file manager to access the file for editing.

    So do i need to just delete the hyphen everywhere it occurs between line 91 and 146?

    The file is well commented, so once you see it, you will be able to tell what titles, and on what pages, will be affected if you change anything. Don't forget to explore the settings in your SEO plugin. There may be some title settings you can change there as well.

    Some reference material for the title function: Function Reference/wp title

  7. theidentityshift
    Member
    Posted 2 years ago #

    That fixed it! It was line 144 in header-actions.php. Had to delete the hyphen.

    Code looked like echo ' - ';

    I had to change it to echo ' ';

    Thanks for the help!

  8. ClaytonJames
    Member
    Posted 2 years ago #

    You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic