WordPress.org

Ready to get started?Download WordPress

Forums

Berlin theme from Graph Paper Press (14 posts)

  1. Sulani
    Member
    Posted 3 years ago #

    Has anyone added a logo image to the header of this theme? I have tried all kinds of things but nothing is working.

  2. Philip Arthur Moore
    Volunteer Moderator
    Posted 3 years ago #

    You'll need to add in your logo with CSS, for example:

    h1 a,
    h1 a.logo { margin: 0; padding: 0; }
    h1 a.logo { background: url('logo.png') no-repeat; display: block; height: 100px; text-indent: -9999px; width: 100px; }

    HTH.

  3. Sulani
    Member
    Posted 3 years ago #

    Thank you, but that doesn't give me the opportunity to add a hyperlink. There must be a place in the XHTML code but all I can find is PHP and everything I have tried has been ineffective. I would like to have a header background and the logo on top of that.

  4. Philip Arthur Moore
    Volunteer Moderator
    Posted 3 years ago #

    In header.php you'll see this bit of code:

    href="<?php echo get_option('home'); ?>"

    You can change that to a different link, for example:

    href="http://wordpress.org/"

    The default link is to your website. HTH.

  5. Sulani
    Member
    Posted 3 years ago #

    How can I attach that to my image file? At this time I have an image but no link. When I added the img tag to the code it didn't work.

  6. Philip Arthur Moore
    Volunteer Moderator
    Posted 3 years ago #

    You display the image with CSS. You display the link with HTML. See the CSS that I posted above. See this for more information. HTH.

  7. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    How can I attach that to my image file? At this time I have an image but no link. When I added the img tag to the code it didn't work.

    If you want a clickable header logo, you need to wrap your image tag in anchor tags, e.g.:

    <a href=""><img src="" /></a>

    The easiest way to do this is to replace the existing anchor link text with your image tag.

  8. Sulani
    Member
    Posted 3 years ago #

    Thank you. This is the code that is in the header. It's confusing to me. I have used the Kubrick template before and have had no trouble.
    <!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 if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?>
    ::
    <?php } ?>
    <?php bloginfo('name'); ?>
    </title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/screen.css" type="text/css" media="screen, projection" />
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/print.css" type="text/css" media="print" />
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen, projection" />
    <!--[if IE]><link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/lib/ie.css" type="text/css" media="screen, projection" /><![endif]-->
    <!--[if lt IE 7]>
    <script defer type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/pngfix.js"></script>
    <![endif]-->
    <!--[if gte IE 5.5]>
    <script language="javaScript" src="<?php bloginfo('template_directory'); ?>/js/dhtml.js" type="text/javaScript"></script>
    <![endif]-->
    <!-- Show the grid and baseline -->
    <!--<style type="text/css">
    .container { background: url(<?php bloginfo('template_directory'); ?>/css/lib/img/grid.png); }*/
    </style>-->
    <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_head(); ?>
    <!-- Javascripts -->
    <script type="text/javascript">
    jQuery(function() {
    jQuery("#slider-posts").cycle({
    fx: "fade",
    timeout: 5000,
    prev: "#prev",
    next: "#next",
    pager: "#slider-nav"
    });
    jQuery("div.menu ul").superfish();
    });
    </script>
    </head>
    <body>
    <div id="top">
    <div id="title">
    <h1> " title="<?php bloginfo('name'); ?>" class="logo">
    <?php bloginfo('name'); ?>
    </h1>
    </div>
    <?php gpp_theme_nav(); ?>
    </div>
    <div class="container">

    I know how to add an image through the CSS but I can't create a link in the header php

  9. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    This amount of code needs to be put in a Pastebin, and linked, rather than embedded directly into your post.

    That said, this is your Site Title:

    <h1><a href="" title="<?php bloginfo('name'); ?>" class="logo">
    <?php bloginfo('name'); ?>
    </a></h1>

    So, replace this:

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

    With your logo image:

    <img src="" />

    which will result in something like this:

    <h1><a href="" title="<?php bloginfo('name'); ?>" class="logo">
    <img src="" />
    </a></h1>
  10. Philip Arthur Moore
    Volunteer Moderator
    Posted 3 years ago #

    Hm. Any reason not to offer the CSS solution given above? It'll make life a lot easier for future changes and also retain the site title for printing.

  11. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    Hm. Any reason not to offer the CSS solution given above? It'll make life a lot easier for future changes and also retain the site title for printing.

    That approach is perfectly valid too, of course.

  12. Sulani
    Member
    Posted 3 years ago #

    I appreciate your help with this, but that doesn't seem to work for me. The logo will show up if I use the CSS to position it but not if I put it in the header.php. For some reason there is no link attached either. I have the header background or the logo showing but I can't do both.

    This is my code

    <div id="top">
    	<div id="title">
    		<h1><a href="http://www.leeclaremont.com" title="<?php bloginfo('name'); ?>" class="logo">
    <img src="images/logo.png" />
    </a></h1>
    	</div>

    And the CSS

    #top
    {
        background: url("images/bg-header.jpg") no-repeat scroll 0 0 transparent;
        display: block;
        height: 123px;
        text-indent: -999em;
        margin: 0 auto;
        width: 980px;
    
    }

    Can I create a new div for the header bg? I have a limited knowledge of php but I do understand HTML and CSS. I don't want to break the code! Is my path the problem in the header.php code?

  13. Sulani
    Member
    Posted 3 years ago #

    I fixed it. I created a new class for the logo and changed the code in the header.php to include that. Thank you so much for all your help!

  14. lorettavanderhorst
    Member
    Posted 3 years ago #

    Hi I have another problem on this theme. I want the home page to feature all the categories I have, but only one category is displayed repeatedly in all areas. (side, bottom, featured slider etc) so those posts are repeated all over the home page. I can't seem to figure out how to organize and feature multiple categories on the home page..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags