• I changed the “Home” link in my main navbar by editing the word “Home” in my header.php to the name of my site.

    <?php if( is_home() ) : ?> class="current_page_item"<?php endif; ?>><a href="<?php bloginfo( 'url' ); ?>" title="<?php bloginfo( 'title' ); ?>">MY SITE NAME</a>

    Where it says “My Site Name” it used to say “Home” ..

    After making that change:

    When I hit CTRL+D to bookmark the page, it’s bookmarking as “Home” still. And yes, I did a hard refresh.

    Obviously, this isn’t good if a visitor bookmarks my page and it’s default named “Home” ..

    How can I get my Blog to Bookmark as something descriptive? What do I need to mod?

    P.S. I also have my site name and tagline in Settings > General.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Bookmarks generally reference the page “Title” from the <title> element typically found in header.php file …

    Here is some code I use in my templates, it may help …

    <title><?php
      if ( is_single() ) { single_post_title(); _e(' | '); bloginfo('name');}
      elseif ( is_home() || is_front_page() ) { bloginfo('name'); _e(' | '); bloginfo('description'); get_page_number(); }
      elseif ( is_page() ) { single_post_title(''); _e(' | '); bloginfo('name'); }
      elseif ( is_search() ) { bloginfo('name'); print __(' | Search results for ') . wp_specialchars($s); get_page_number(); }
      elseif ( is_404() ) { bloginfo('name'); _e(' | Not Found'); }
      else { bloginfo('name'); wp_title(__(' | ')); get_page_number(); }
    ?></title>

    NB: ‘get_page_number()’ is from the theme functions.php file …

    // Get the page number
    function get_page_number() {
        if ( get_query_var('paged') ) {
            print ' | ' . __( 'Page ') . get_query_var('paged');
        }
    }
    // end get_page_number

    Thread Starter cstina

    (@cstina)

    Hm, I’m still a little confused on the edit… here’s the relevant section in my header.php, I think:

    <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    Where would I input the “Desired_Bookmark_Name” ?

    =/

    Thread Starter cstina

    (@cstina)

    I should add to the above ^^

    When I replace what is between the title tags with:

    <title><?php if(is_front_page()) bloginfo('name');
    elseif(is_search()) bloginfo('name');echo' : Search results';}
    }
    elseif (is_404()) {bloginfo('name');echo' : Page not found!';}
    elseif (have_posts()) {wp_title(':',true,'right');bloginfo('name');}
    else {bloginfo('name');}?>
    </title>

    … my blog completely goes offline – it will not load.

    The first block of code can be used to replace this in your theme:

    <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>

    Make sure to copy and paste the second block into your function.php file.
    … or, simply remove all the ‘get_page_number();’ references if you do not want to edit your function.php file.

    What you are showing contains the ‘have_posts()’ function call, I believe that is what is creating your “not load” issue as it is typically used in “The Loop” not the header.php file.

    Thread Starter cstina

    (@cstina)

    Okay, I’m getting somewhere!

    I did what you said above.

    1) Replaced the <title> tags in the header.php with this:

    <title><?php
      if ( is_single() ) { single_post_title(); _e(' | '); bloginfo('name');}
      elseif ( is_home() || is_front_page() ) { bloginfo('name'); _e(' | '); bloginfo('description'); get_page_number(); }
      elseif ( is_page() ) { single_post_title(''); _e(' | '); bloginfo('name'); }
      elseif ( is_search() ) { bloginfo('name'); print __(' | Search results for ') . wp_specialchars($s); get_page_number(); }
      elseif ( is_404() ) { bloginfo('name'); _e(' | Not Found'); }
      else { bloginfo('name'); wp_title(__(' | ')); get_page_number(); }
    ?></title>

    2) Added the following to functions.php:

    // Get the page number
    function get_page_number() {
        if ( get_query_var('paged') ) {
            print ' | ' . __( 'Page ') . get_query_var('paged');
        }
    }
    // end get_page_number

    Result?

    All of my Pages and Posts *are* Bookmarking correctly now. THANK YOU!

    However, my main page at “mydomain.com” is still bookmarking as “Home” – and I do not have a single Page/Post or anything indicated in my Blog Name or Tagline (in General > Settings) as “Home.”

    I cannot figure out where the “Home” Bookmark name is coming from.

    Ideas?

    Ty so much.

    Perhaps a link to your blog will shed some additional details …

    Thread Starter cstina

    (@cstina)

    <snip> sorry

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘When I Bookmark My Blog, it Saves as “Home” Instead of my Site Name?’ is closed to new replies.