• Resolved PCHAmedia

    (@pchamedia)


    I’m having trouble removing the dash from in front of our site’s title.

    https://www.pinellashousing.com

    It appears in tabbed browsing and in Google search results. I’ve already checked the page’s title in general settings, and I don’t have SEO by Yoast plugin installed, so I think it is somewhere here, in the head.php:

    <title>
    		   <?php
    		      if (function_exists('is_tag') && is_tag()) {
    		         single_tag_title("Tag Archive for &quot;"); echo '&quot; - '; }
    		      elseif (is_archive()) {
    		         wp_title(''); echo ' Archive - '; }
    		      elseif (is_search()) {
    		         echo 'Search for &quot;'.wp_specialchars($s).'&quot; - '; }
    		      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>

    Can somebody please help me sort that out so that I can remove the dash in our site’s title? Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • matt4356

    (@matt4356)

    Hiya! Before doing anything, make sure you have up to date backups >>> WordPress_Backups

    That being finished, I think what’s doing it is the ” echo ‘ – ‘; ” on this line
    ` if (is_home()) {
    bloginfo(‘name’); echo ‘ – ‘; bloginfo(‘description’); }`

    What it does is display ‘ – ‘ wherever is_home() evaluates to true. If you delete the “space hyphen space” between the two quotes, it wont display that before the blog description.

    Thread Starter PCHAmedia

    (@pchamedia)

    that seems to have worked! I actually took it out of the wp_title(”) line, but it was the same echo. Thank you! I will mark as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dash, hyphen in website title’ is closed to new replies.