WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I am trying to add a header (8 posts)

  1. novice2012
    Member
    Posted 1 year ago #

    I recently downloaded a Fresh&Clean theme and the theme allows you to type in your site name and tag line, but I would rather upload my logo image and use that instead. Is there anyway to edit the code to do this? I have included the header.php code below. I am not sure if this is what I need.

    <?php $options = get_option( 'fresh_theme_settings' ); ?>
    <!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(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title>
    
    <!-- Styles & Favicon -->
    <link rel="icon" type="image/png" href="<?php echo $xs_favicon; ?>" />
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />
    
    <!-- JS & WP Head -->
    <?php
    if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
    wp_head();
    ?>
    
    <? if ( is_front_page() ) { ?>
    <!-- nivoslider -->
    <script type="text/javascript">
    jQuery(function($){
    $(window).load(function() {
    //homepage Slider
    	$('#slider').nivoSlider({
    		directionNav: true,
    		directionNavHide: true,
    		captionOpacity: 0.8,
    		controlNav: false,
    		boxCols: 8,
    		boxRows: 4,
    		slices: 15,
    		effect:'<?php if($options['effect'] != '') { echo $options['effect']; } else { echo 'fade'; } ?>',
    		animSpeed: <?php if($options['anim_speed'] != '') { echo $options['anim_speed']; } else { echo 500; } ?>,
    		pauseTime: <?php if($options['pause_time'] != '') { echo $options['pause_time']; } else { echo 3000; } ?>
    	});
    	});
    });
    </script>
    <? } ?>
    
    <!-- Superfish Navigation Menu -->
    <script>
    jQuery(function($){
        $(document).ready(function() {
            $('ul.sf-menu').superfish({
                delay: 100,
                animation: {opacity:'show',height:'show'},
    			speed: 'normal',
                autoArrows:  false,
                dropShadows: true
            });
        });
    });
    </script>
    
    <?php
    // Get And Show Analytics Code
    echo stripslashes($options['analytics']);
    ?>
    
    </head>
    <body>
    <div id="header">
      <div id="header-logo">
     			 <?php if($options['logo'] !='') { ?>
                	<a>/" title="<?php bloginfo( 'name' ) ?>" rel="home"><img src="<?php echo $options['logo']; ?>" alt="<?php bloginfo( 'name' ) ?>" /></a>
               	 <?php } else { ?>
                	<?php if (is_front_page()) {?>
            			<h1><a>/" title="<?php bloginfo( 'name' ) ?>" rel="home"><?php bloginfo( 'name' ) ?></a></h1>
                    <?php } else { ?>
                    	<h2><a>/" title="<?php bloginfo( 'name' ) ?>" rel="home"><?php bloginfo( 'name' ) ?></a></h2>
    				<?php } ?>
            		<p id="header-description">
    					<?php bloginfo( 'description' ) ?>
    				</p>
                    <?php } ?>
    	</div><!-- /header-logo -->
    
    		<?php if($options['header_ad'] != '') { ?>
                <div id="header-banner">
                    <?php echo stripslashes($options['header_ad']); ?>
               </div><!-- END header-ad -->
           <?php } ?>
    
    </div><!-- /header -->
    <div id="primary-nav">
    <?php wp_nav_menu(
    	array(
    		'theme_location' => 'primary',
    		'sort_column' => 'menu_order',
    		'menu_class' => 'sf-menu',
        	'fallback_cb' => 'default_menu' ) ); ?>
    <div class="clear"></div>
    </div><!-- /primary-nav -->
    <div id="wrap">
    <?php if (is_front_page()) {?>
    <?php get_template_part( 'nivoslider' ) ?>
    <?php } ?>
  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    from the theme's website:

    Optional logo – theme option to insert logo URL

    is that not working?

  3. novice2012
    Member
    Posted 1 year ago #

    Actually, that isn't an option on the theme.

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    where did you download the theme from?

    your posted code also refers to such an option:

    <?php if($options['logo'] !='') { ?>
  5. novice2012
    Member
    Posted 1 year ago #

    I downloaded the theme from: [ link removed ]

    I tried downloading it from WPExplorer but it wouldn't let me do so, so I found the them on the website above.

    By the way, thanks for responding.

  6. novice2012
    Member
    Posted 1 year ago #

    Also, if it refers to such an option, shouldn't it be available in my admin area?

  7. sigmundo
    Member
    Posted 1 year ago #

    i have the same problem. any hints?

  8. yesigebreselassie
    Member
    Posted 1 year ago #

    Can someone please help me. I am using the response theme and I need to get a custom header design but I don't know what is the size of the header so I can give my designer this information. I don't want the header to be too wide or narrow, so please can someone help me out.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic