Tagged: , , ,

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1398

    Is there a way for me to make the browser title bar also show the name of the website? Currently, it just shows the title of the page that you are on. I would like for it to show both. For example: On this site, no matter which page you are on, you always see “WordPress Themes and HTML Templates” in addition to the page name.

    Thanks in advance for any help.

    #35060

    You can edit header.php (found in wp-content/themes/cleancut) on line 20.

    <title><?php if (is_home()) { bloginfo('name'); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(''); ?> - THE SITE NAME HERE</title>

    #35061

    Excellent. Thanks! I will give this a try tomorrow.

    #35062

    As an addon to this question, I would like to have both the site name and the tagline appear in the browser title bar… Is this the same place to do that, it seems so, but not sure? Also, can both the site name and tagline be picked up rather than hard coded?

    #35063

    Yep, a few lines up you’ll find the title tag

    <!-- title -->

    <title><?php if (is_home()) { bloginfo('name'); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(''); ?> INSERT EXTRA TEXT HERE</title>

    #35064

    I’m still having trouble getting the Facebook Like buttons to pull the correct information over to Facebook. I realize that I’m using a third-party addon widget to do this and that you can’t support that… but I’m afraid that the meta data on the page is wrong.

    For example… On this page: http://hueyburger.com/menu/friedpickles/ …. The title of the page is “Fried Pickles” and the site name is “Huey’s Restaurant”. When the recommend button is clicked, it should pull over to Facebook that the person “recommends Fried Pickles (link) on Huey’s Restaurant (link). Earlier this evening, it was pulling over text from the front page of the site from this page. It said that I “recommend “Welcome to Huey’s! Memphis’ favorite Blue’s, Brews and Burgers since 1970.”… which is what I have set as the ‘Mainpage Headline’. And now this evening, I am getting a Facebook error that reads “The page at http://hueyburger.com/menu/friedpickles/ could not be reached.”.

    Can anyone shed any light on what is going on here?

    Thanks!

    #35065

    I’ve entered a name for my blog in wordpress itself, and wp_title calls it. So my home page is displayed. When I go to Archives, the page name “Archives” is displayed. Can it show for example “Archives :: Site Name”?

    #35066

    In archive.php you’ll find code lines like:

    <?php _e('Archive for','cleancut'); ?>  "<?php echo single_cat_title(); ?>"

    or:

    <?php _e('Archive for','cleancut'); ?>  "<?php the_time('F jS, Y'); ?>"

    If you want to append the page title just add

    <?php bloginfo('name'); ?>

    to them like:

    <?php _e('Archive for','cleancut'); ?>  "<?php echo single_cat_title(); ?>" || <?php bloginfo('name'); ?>

    or:

    <?php _e('Archive for','cleancut'); ?>  "<?php the_time('F jS, Y'); ?>" || <?php bloginfo('name'); ?>

    You can use any delimiter you like – I used || but you can i.e. use :: etc.

    #35067

    Doesn’t work.

    I thought this should be in header.php?

    #35068

    Sorry, I thought you’re refering to the archive headings…

    Yes – you need to change the title in header.php. Search for:

    <title><?php if (is_home()) { bloginfo('name'); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(''); ?></title>

    and change it to:

    <title><?php if (is_home()) { bloginfo('name'); ?><?php } elseif (is_page() ||is_single()) { ?> <?php } elseif (is_category() ||is_archive()) {?>Archives ::  <?php bloginfo('name'); ?><?php } ?><?php wp_title(''); ?></title>

    #35069

    Dude, Thank You!!!

    #35070

    Glad that I could help you :)

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Site name in browser title bar’ is closed to new replies.