WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. havurattikvah
    Member
    Posted 2 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
    Member
    Posted 2 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
    Member
    Posted 2 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.

    Thanks.

  4. threestyler
    Member
    Posted 2 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:
    http://codex.wordpress.org/Function_Reference/wp_title

  5. havurattikvah
    Member
    Posted 2 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.
    Thanks.
    http://pastebin.com/DAtBuw4U

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

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

  7. havurattikvah
    Member
    Posted 2 years ago #

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

    <title>
    <?php
    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; }
    ?>
    </title>

  8. havurattikvah
    Member
    Posted 2 years ago #


  9. havurattikvah
    Member
    Posted 2 years ago #

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

  10. havurattikvah
    Member
    Posted 2 years ago #

    Google search listing:

    - Havurat Tikvah
    http://www.havurattikvah.org/

    Want to get rid of the dash before the name.

  11. havurattikvah
    Member
    Posted 2 years ago #

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

  12. Rev. Voodoo
    Volunteer Moderator
    Posted 2 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

    <title>
    
    buncha code
    
    </title>

    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:
    http://wordpress.org/extend/plugins/wordpress-seo/

    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

Tags