WordPress.org

Ready to get started?Download WordPress

Forums

Piano Black
Separate Header for Main and Subpages for Piano Black Theme (1 post)

  1. upfilminstitute
    Member
    Posted 2 years ago #

    This is the website that I am working on using the Piano Black Theme. My website

    I uploaded a plug-in calledDynamic Headers to the said theme.

    After working on with some settings and instructions provided by the plug-in, I got stuck to the last instruction as to where will I put this single php quote inside the header.php file as told by the plug-in.

    <?php if(function_exists('show_media_header')){ show_media_header(); } ?>

    to header.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

    <title><?php wp_title(''); if (function_exists('is_tag') and is_tag()) { ?><?php } if (is_archive()) { ?><?php } elseif (is_search()) { ?><?php echo $s; } if ( !(is_404()) and (is_search()) or (is_single()) or (is_page()) or (function_exists('is_tag') and is_tag()) or (is_archive()) ) { ?><?php _e(' | '); ?><?php } ?><?php bloginfo('name'); ?></title>

    <meta name="description" content="<?php if (is_home()): echo bloginfo('description'); else: echo the_title(); endif; ?>" />

    <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'); ?>" />

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/comment-style.css" type="text/css" media="screen" />
    <?php if (strtoupper(get_locale()) == 'JA') : ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/japanese.css" type="text/css" media="screen" />
    <?php elseif (strtoupper(get_locale()) == 'HE_IL' || strtoupper(get_locale()) == 'FA_IR') : ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/rtl.css" type="text/css" media="screen" />
    <?php endif; ?>

    <!--[if lt IE 7]>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/iepngfix.js"></script>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie6.css" type="text/css" media="screen" />
    <![endif]-->

    <?php $options = get_option('pb_options'); if($options['image_style']) { ?>

    <style type="text/css">
    .post img, .post a img { border:1px solid #222; padding:5px; margin:0; background:#555; }
    .post a:hover img { border:1px solid #849ca0; background:#59847d; }
    .post img.wp-smiley { border:0px; padding:0px; margin:0px; background:none; }
    </style>
    <?php }; ?>

    <?php wp_enqueue_script( 'jquery' ); ?>
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/scroll.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jscript.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/comment.js"></script>
    </head>
    <body>
    <div id="wrapper">
    <div id="contents">

    <div class="header-menu-wrapper clearfix">
    <div id="pngfix-right"></div>
    <?php if($options['use_wp_nav_menu']) { ?>
    <?php if (function_exists('wp_nav_menu')) { wp_nav_menu( array( 'sort_column' => 'menu_order') ); }; ?>
    <?php } else { ?>
    <ul class="menu">
    <li class="<?php if (!is_paged() && is_home()) { ?>current_page_item<?php } else { ?>page_item<?php } ?>">/"><?php _e('HOME','piano-black'); ?>
    <?php
    if($options['header_menu_type'] == 'pages') {
    wp_list_pages('sort_column=menu_order&depth=0&title_li=&exclude=' . $options['exclude_pages']);
    } else {
    wp_list_categories('depth=0&title_li=&exclude=' . $options['exclude_category']);
    }
    ?>

    <?php }; ?>
    <div id="pngfix-left"></div>
    </div>

    <div id="header">
    <?php if ($options['use_logo']) : ?>
    <div id="logo_image">
    <h1>/"><img src="<?php bloginfo('template_url'); ?>/img/<?php echo $options['logo_name']; ?>" title="<?php bloginfo('name'); ?>" alt="<?php bloginfo('name'); ?>" /></h1>
    </div>
    <?php else : ?>
    <div id="logo">
    /"><?php bloginfo('name'); ?>
    <h1><?php bloginfo('description'); ?></h1>
    </div>
    <?php endif; ?>
    <div id="header_meta">
    <?php if ($options['header_search']) : ?>
    <div id="search-area"<?php if (!$options['header_rss']&&!$options['header_twitter']) : echo ' style="margin-right:0;"'; endif; ?>>
    <?php if ($options['use_google_search']) : ?>
    <form action="http://www.google.com/cse" method="get" id="searchform">
    <div><input type="text" value="<?php _e('Google Search','piano-black'); ?>" name="q" id="search-input" onfocus="this.value=''; changefc('white');" /></div>
    <div>
    <input type="image" src="<?php bloginfo('template_url'); ?>/img/search-button.gif" name="sa" alt="<?php _e('Search from this blog.','piano-black'); ?>" title="<?php _e('Search from this blog.','piano-black'); ?>" id="search-button" />
    <input type="hidden" name="cx" value="<?php echo $options['custom_search_id']; ?>" />
    <input type="hidden" name="ie" value="UTF-8" />
    </div>
    </form>
    <?php else: ?>
    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <div><input type="text" value="<?php _e('Search','piano-black'); ?>" name="s" id="search-input" onfocus="this.value=''; changefc('white');" /></div>
    <div><input type="image" src="<?php bloginfo('template_url'); ?>/img/search-button.gif" alt="<?php _e('Search from this blog.','piano-black'); ?>" title="<?php _e('Search from this blog.','piano-black'); ?>" id="search-button" /></div>
    </form>
    <?php endif; ?>
    </div>
    <?php endif; ?>

    <?php if ($options['header_rss']) : ?>
    " id="rss-feed" title="<?php _e('Entries RSS','piano-black'); ?>" ><?php _e('RSS','piano-black'); ?>
    <?php endif; ?>
    <?php if ($options['header_twitter']) : ?>
    " id="twitter" title="<?php _e('TWITTER','piano-black'); ?>" ><?php _e('Twitter','piano-black'); ?>
    <?php endif; ?>

    </div><!-- #header_meta end -->

    </div><!-- #header end -->

    Problem

    I'm not a php programmer and as much as I try to back-up and do the trial and error system to make the plug-in work for the website, still I don't get the right result. The plug-in actually worked but The new header images I uploaded just appeared under the default header and even making some mess on the layout. Though I also tried to delete the default header image and discard its css attributes, the new header still does not lay unto the right position.

    Any programming help? or can you suggest other options as to how I can have a different header images, with no issues to any file types and size format, assigned for my main page and sub pages?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by upfilminstitute
  • This topic is not resolved
  • WordPress version: 3.1.2