Getting rid of dashes before site name on tabs/searches (12 posts)

  1. havurattikvah
    Posted 4 years ago #

    I have just recently taken over as webmaster for my congregation's website. I'm a newbie. Only been doing WP now for a couple of months. I am someone who likes to try to figure out stuff before I cry "help." That being said, I have tried to follow instructions for deleting a hyphen that shows up in search engine searches that shows our website. It says - Havurat Tikvah. Also, the dash shows up on the tabs. I have not found anything that totally matches up with what you have shared with others who have had those type of questions here. I don't want to call the web designer because I want to handle this myself.
    So, what can I do?

  2. threestyler
    Posted 4 years ago #

    First of all in the admin go to Settings > General and look under 'Site Title'.

    Next, go to Theme > Editor and select your themes header.php and look for a hardcoded dash in the title. <title> </title> tags.

    Next some plugins will rewrite the titles for SEO, so disable all plugins then look at the page source.

  3. havurattikvah
    Posted 4 years ago #

    There is no dash in the general settings for the site title.

    I'd like to send you the code between the title tags. Might be easier for you to see. Not sure if I'm supposed to put it here.
    I see dashes there, but not sure if they are supposed to be there or not.


  4. threestyler
    Posted 4 years ago #

    You can safely replace <title> tags and code between with:

    <title><?php wp_title ('|', true,'right' ); ?></title>

    This example uses a pipe instead of a dash and will show the title to the right of the post/page title on those pages.

    Otherwise you could use:

    <title><?php wp_title (); ?></title>

    That should resolve your dashes. You could also just hard code the output and save on an additional database query: <title>Your chosen title</title>

    Take a look through the codex for many more example usages:

  5. havurattikvah
    Posted 4 years ago #

    Back at it again. I've done a PasteBin thing for you to see what I have now, unedited. I don't see what you are talking about here, at least I don't think so.
    Any advice on getting rid of the dash in the Google search listing and in the browser tab would be most appreciative.

  6. Rev. Voodoo
    Posted 4 years ago #

    You've made the paste private, we can't see it

  7. havurattikvah
    Posted 4 years ago #

    In case this did not work right, here is the code:

    if (function_exists('is_tag') && is_tag()) {
    single_tag_title("Tag Archive for ""); echo '" - '; }
    elseif (is_archive()) {
    wp_title(''); echo ' Archive - '; }
    elseif (is_search()) {
    echo 'Search for "'.wp_specialchars($s).'" - '; }
    elseif (!(is_404()) && (is_single()) || (is_page())) {
    wp_title(''); echo ' - '; }
    elseif (is_404()) {
    echo 'Not Found - '; }
    if (is_home()) {
    bloginfo('name'); echo ' - '; bloginfo('description'); }
    else {
    bloginfo('name'); }
    if ($paged>1) {
    echo ' - page '. $paged; }

  8. havurattikvah
    Posted 4 years ago #

  9. havurattikvah
    Posted 4 years ago #

    Made it public. See if that works better. Again, I am a real novice right now. Thanks for your patience.

  10. havurattikvah
    Posted 4 years ago #

    Google search listing:

    - Havurat Tikvah

    Want to get rid of the dash before the name.

  11. havurattikvah
    Posted 4 years ago #

    If you visit the site, you can see the dashes in the browser tab (at least in Firefox).

  12. Rev. Voodoo
    Posted 4 years ago #

    @threestylers advice still holds true for you.

    You can safely replace that entire block of code you posted that starts with title, and ends with /title

    buncha code

    With either of the little bits of code he gave up above

    If you go with the most basic...

    <title><?php wp_title(); ?></title>

    You could even install an SEO plugin, like:

    Which can allow you to fine tune what gets displayed per post/page.

Topic Closed

This topic has been closed to new replies.

About this Topic