WordPress.org

Ready to get started?Download WordPress

Forums

No custom logo showing up on homepage (5 posts)

  1. micheldegroot
    Member
    Posted 5 years ago #

    I am working on a site with the Depo Masthead theme. I changed the text logo into a custom one but strange enough the custom logo only appears on the single posts and pages but not ontc eh frontpage.

    Here's the site: http://www.micheldegroot.com/IndePhojo/

    And here's the code of the header.php:

    s<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php wp_title(); ?><?php bloginfo('name'); ?></title>

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <!--[if gte IE 6]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" type="text/css" media="screen" /><![endif]-->

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_enqueue_script('jquery'); ?>

    <?php
    if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
    wp_head();
    ?>

    <script type="text/javascript" charset="utf-8">

    /*<![CDATA[ */
    //set title font size
    jQuery(document).ready(function() {

    function resize(selector, max) {
    jQuery(selector).each(function() {

    var width = jQuery(this).width();
    var height = jQuery(this).height();
    if(width > max) {
    var r = ( height / width );
    var w = max;
    var h = ( w * r );
    jQuery(this).height(h).width(w);
    }});
    }

    resize('#home .gallery img', 90);
    resize('#home .entry img', 300);
    resize('#home .wp-caption img', 290);
    resize('#home .wp-caption', 300);
    jQuery('#home .wp-caption').css('height', 'auto');
    });
    /* ]]> */
    </script>

    </head>
    <body<?php if(is_front_page() or is_home()) { echo ' id="home"'; } ?>>
    <div id="page">

    <h1 class="name">/" title="<?php bloginfo('description'); ?>">
    <span>

    <?php $my_query = new WP_Query('showposts=1');
    while ($my_query->have_posts() && $count < 1) : $my_query->the_post();
    $do_not_duplicate = $post->ID;?>
    <?php $count++; $title = get_userdata($post->post_author); $title = $title->display_name; ?><?php endwhile; ?><?php echo (get_option('depo-author-name')) ? get_option('depo-author-name') : $title; ?></span>
    </h1>

    <div id="container">
    <div class="sleeve">

    <div id="header">
    <?php

    $title = strlen(get_bloginfo('name'));

    if($title >= 30) $title = 40;
    $new_size = (1000/$title)*2;
    if($new_size > 120) $new_size = 120;
    if(preg_match('/.*\s.*/',$title) === false && ($title > 20)) $new_size = 72;
    $size = $new_size;

    ?>
    <h1 style="font-size: 3em">
    <?php if(!is_front_page()) { ?>/" rel="home"><img src="http://www.phocazz.com/IndePhojo.png" border="0" alt="logo">
    <?php } ?>

    </h1>
    <ul id="menu">
    <?php
    $pages = get_pages('sort_column=menu_order');
    foreach ($pages as $pagg) {
    if ( $pagg->post_parent == 0 ) {
    $option = '

  2. ID).'">';
    $option .= $pagg->post_title;
    $option .= '
    <span>|</span>
  3. ';
    echo $option;
    }
    }
    ?>

  4. /<?php echo mysql2date('Y', get_lastpostdate('blog')); ?>/">Archives<span>|</span>
  5. ">RSS Feed
  6. </div>

    <div id="content" class="group">

    Thanks

  • oleck85
    Member
    Posted 4 years ago #

    Hi,

    on your blog I can see that you managed to use image on your mane page. Could you tel me how did you do that? Because I would like to do the same with my blog.

    Thanks.

  • Peter Boosten
    Member
    Posted 4 years ago #

    <?php if(!is_front_page()) { ?>/" rel="home"><img src="http://www.phocazz.com/IndePhojo.png" border="0" alt="logo">
    <?php } ?>

    "if NOT is_front_page() show image"

    Peter

  • oleck85
    Member
    Posted 4 years ago #

    Thanks Peter for the code but could you show me where exactly should I put it into the code?

  • oleck85
    Member
    Posted 4 years ago #

    Ok, I've changed it.

    Thanks

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags