adding images to sidebar ?
-
Hi, I have a theme with Four advertising cells at the top of my sidebar.
I have been told that to insert images that I have to hard code them in my sidebar (PHP) file. But I am unsure where to place the code.
My site is at http://www.deerhuntingtipsonline.comhere is the current sidebar code…any help would be much appreciated.
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
?>
<div id=”sidebar”><div style=”width:275px;height:50px;background:#FFF;margin:10px 0 0 0;line-height:50px;”>
<img src=”<?php bloginfo(‘template_directory’); ?>/images/twitter_logo.jpg” align=”left” style=”margin: 5px 10px 0 5px;” width=”39″ height=”38″ border=”0″ alt=”” />
<b>Follow me on Twitter</b>
</div>
<div style=”width:275px;height:50px;background:#FFF;margin:10px 0 0 0;line-height:50px;”>
<img src=”<?php bloginfo(‘template_directory’); ?>/images/facebook_logo.jpg” align=”left” style=”margin: 5px 10px 0 5px;” width=”39″ height=”38″ border=”0″ alt=”” />
<b>Be my friend on Facebook</b>
</div>
<div style=”width:275px;height:125px;margin:20px 0 0 0;”>
<img src=”<?php bloginfo(‘template_directory’); ?>/images/banner.jpg” width=”125″ height=”125″ border=”0″ alt=”” />
<img src=”<?php bloginfo(‘template_directory’); ?>/images/banner.jpg” width=”125″ height=”125″ style=”margin-left:20px;” border=”0″ alt=”” />
</div><img src=”<?php bloginfo(‘template_directory’); ?>/images/banner.jpg” width=”125″ height=”125″ border=”0″ alt=”” />
<img src=”<?php bloginfo(‘template_directory’); ?>/images/banner.jpg” width=”125″ height=”125″ style=”margin-left:20px;” border=”0″ alt=”” />
</div><div id=”sidebar_items”>
-
<?php /* Widgetized sidebar, if you have the plugin installed. */
-
<?php /* If this is a 404 page */ if (is_404()) { ?>
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
<p>You are currently browsing the archives for the <?php single_cat_title(”); ?> category.</p><?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p>You are currently browsing the /”><?php echo bloginfo(‘name’); ?> blog archives
for the day <?php the_time(‘l, F jS, Y’); ?>.</p><?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p>You are currently browsing the /”><?php echo bloginfo(‘name’); ?> blog archives
for <?php the_time(‘F, Y’); ?>.</p><?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p>You are currently browsing the /”><?php echo bloginfo(‘name’); ?> blog archives
for the year <?php the_time(‘Y’); ?>.</p><?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p>You have searched the /”><?php echo bloginfo(‘name’); ?> blog archives
for ‘<?php the_search_query(); ?>’. If you are unable to find anything in these search results, you can try one of these links.</p><?php /* If this is a monthly archive */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
<p>You are currently browsing the /”><?php echo bloginfo(‘name’); ?> blog archives.</p><?php } ?>
if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?><?php if ( is_404() || is_category() || is_day() || is_month() ||
is_year() || is_search() || is_paged() ) {
?><?php }?>
<ul role=”navigation”>
<?php wp_list_pages(‘title_li=<h2>Pages</h2>’ ); ?>- <h2>Archives</h2>
-
<?php wp_get_archives(‘type=monthly’); ?>
<?php wp_list_categories(‘show_count=1&title_li=<h2>Categories</h2>’); ?>
-
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
- <h2>Meta</h2>
<?php wp_list_bookmarks(); ?>-
<?php wp_register(); ?>
- <?php wp_loginout(); ?>
- WordPress
- WordPress Theme
<?php wp_meta(); ?>
<?php } ?>
<?php endif; ?>
-
-
use wp125 plugin for banner. Hope it will help you. try it
- The topic ‘adding images to sidebar ?’ is closed to new replies.