treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] WordPress Page Name & Favicon

  • Okay, I have two simple questions.

    I am designing a new website, here, and I want it to say "Home - Gloom, the Novellas" at the top of the window. So, I set my front page to display a static page called "Home" in Settings > Reading, but when I view the page, it only displays "- Gloom, the Novellas." Is there a way to fix this?

    Also, for some reason, my website is displaying an old favicon from another website that I designed. So, I checked to see if the favicon in my directory folder was the right one and it is. It should be displaying a black silhouette of a moth instead of the letter "M." Again, is there a way to fix this?

    Thank you in advance!
  • Clear your cache. It displays a butterfly (not a moth) for me
  • What's your php in header.php for specifying the title of the page? And as for your favicon, I think you just have the old icon cached or something, because I see the black moth silhouette.
  • Thanks. I cleared my cache and I can now see the moth silhouette as well. Here is the code in my header.php that generates the title:


    <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>
  • Couldn't you just do this?
    if (is_home()) {
    bloginfo('name'); echo 'Home - '; bloginfo('description'); }


    I use an SEO plugin where I can declare exactly what I want it to output.
  • I downloaded the plugin and changed the name. Thanks for the tip!