Static image on homepage
-
I’m trying to add a Facebook and a Twitter icon to my homepage, without having them displayed on other pages. Below is my header.php file:
<!DOCTYPE html> <html> <head> <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <link rel="shortcut icon" href="<?php echo bloginfo('template_directory') ?>/favicon.ico" type="image/x-icon" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php wp_head(); ?> <link rel="stylesheet" href="<?php bloginfo('template_directory') ?>/style_v6.css" type="text/css" media="screen" /> </head> <?php $s = get_search_query(); $s = ''; if ($s != '') { ?> <body onload="searchPrompt('<?php echo $s; ?>', false)"> <?php } else { ?> <body > <?php } ?> <?php if (is_front_page()) { ?> <div id="slide"> <?php putRevSlider("main_slider", "homepage") ?> </div> <?php } else { ?> <div id="slide-background"> <img src="<?php echo content_url() . '/gallery/img/background-html.jpg' ?>" /> </div> <?php } ?> <div id="wrap"> <div id="<?php if (is_front_page()) { echo 'wrap-body-frontpage'; } else { echo 'wrap-body'; } ?>"> <div id="<?php if (is_front_page()) { echo 'header-frontpage'; } else { echo 'header'; } ?>"> <a href="<?php bloginfo('wpurl'); ?>"><h1>Name of site</h1></a> <div id="main-social"> <div id="header-sidebar"> <ul> <li><a href="https://www.facebook.com/xxx" target="_blank"><div class="facebook-button" ></div></a></li> <li><a href="https://twitter.com/xxx" target="_blank"><div class="twitter-button" ></div></a></li> <li></li> <?php dynamic_sidebar('header-sidebar'); ?> </ul> </div> </div> <!-- en main-social --> <?php wp_nav_menu('theme_location=header'); ?> </div> <!-- end header -->
Any help would be greatly appreciated. Thank you.
- The topic ‘Static image on homepage’ is closed to new replies.