WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Header Banner for single pages (4 posts)

  1. nuovohost
    Member
    Posted 3 years ago #

    Hello,
    I am really new to 'wordpress theme modification' and have little or no knowledge of PHP coding. I have a site on which I am using 'argoniod' theme.

    link: http://www.paddsolutions.com/wpmag/argonoid/

    The theme is fine, only that I need multiple banner in the site I am designing, insted of one banner the theme is using.

    The theme is using the following code in header.php

    <div class="box box-masthead">
    				<?php $tag = (is_home()) ? 'h1' : 'p'; ?>
    				<<?php echo $tag; ?> class="title"><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></<?php echo $tag; ?>>
    				<p class="description"><?php bloginfo('description'); ?></p>
    			</div>
    
    			<div class="box box-ads">
    				<h3>Advertisement</h3>
    				<div class="interior">
    					<?php padd_theme_widget_banner(); ?>
    				</div>
    			</div>

    I have modified the code a bit to display four banners linked to sub-pages of wordpress. The above code looks like this:

    <div class="box box-masthead">
    
                            <?php $tag = (is_home())? 'h1' : 'p';?>
    		        <<?php echo $tag; ?> class="title"><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></<?php echo $tag; ?>
    
    			<p class="description"><?php bloginfo('description'); ?></p>
    
    			</div>
    			<div class="box box-ads">
    				<h3>Advertisement</h3>
    				<div class="interior">
    
    <ul>
    <li><a href="http://www.tanvirmorshed.com/indigorestaurant/about/conference-and-private-party/"><img src="Conference and Private Party.png" alt="Indigo Conference and Party Room for hire" width="160" height="80" /></a></li>
    <li><a href="http://www.tanvirmorshed.com/indigorestaurant/about/Presentation-room-for-hire/"><img src="Presentation Room.png" alt="Indigo Presentation Room for hire" width="160" height="80" /></a></li>
    <li><a href="http://www.tanvirmorshed.com/indigorestaurant/about/indigo-in-a-hurry/"><img src="Indigo In a hurry.png" alt="Indigo in a hurry" width="160" height="80" /></a></li>
    <li><a href="http://www.tanvirmorshed.com/indigorestaurant/menus/indigo-lunch-platter/"><img src="Indigo Lunch Platter.png" alt="Indigo Lunch Platter" width="160" height="80" /></a></li>
    </ul>
    
    				</div>
    			</div>

    The problem is the four banners is not showing up in 'single pages of the site'. I am just wondering how can I show the four banners in 'single pages' as well as 'home page'.

    Many thanks in advance for the help.

  2. Root
    Member
    Posted 3 years ago #

    put the code in single.php template too ?

  3. jrav001
    Member
    Posted 3 years ago #

    Don't change your single.php as suggested above - you got it in the correct place. All you have to do is change the directory reference for your images. Something like this....

    <img src="<?php bloginfo('template_url'); ?>/images/image.jpg" alt="alt text" >

  4. nuovohost
    Member
    Posted 3 years ago #

    ~Jrav~ Many thank for the reply. It worked fine.
    ~Root~ Also many thanks to you too.

Topic Closed

This topic has been closed to new replies.

About this Topic