Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Banner image only working with some page templates « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Banner image only working with some page templates

(1 post)
  • Started 4 years ago by beanfair
  • This topic is not resolved
  1. beanfair
    Member

    My client wants a banner style image at the top of pages. It works on the single.php in my child theme like http://wineworldwarehouse.com/contact-us/ but I can't get it to work on the blog page http://wineworldwarehouse.com/blog/ or other custom page templates like http://wineworldwarehouse.com/testing/

    In all of the templates I have the following code:
    <div id="container">
    <?php top_image() ?>
    <div id="content">

    Here is a snippet of the function
    <?php
    //Conditional top_image
    function top_image() {
    if (is_page('our-store') ) {?>
    <div id="top">
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/category/WineWorld.jpg" alt="wine bar" width="987"/></div> <?php }
    elseif (is_page('tasting-bar') ) {?>
    <div id="top">
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/category/WineBar2.jpg" alt="wine bar" width="987"/></div> <?php }
    elseif (is_page('classes') ) {?>
    <div id="top">
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/category/WinePurchase.jpg" alt="wine bar" width="987"/></div> <?php }

    I have snipped out some of the image dueto length, here is the end of the function
    elseif (is_page_template('single.php') ) {?>
    <div id="top">
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/category/WineBottle.jpg" alt="Wine Vendor" width="987"/></div> <?php }
    elseif (is_page_template('blog-page.php') ) {?>
    <div id="top">
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/category/WineBottle.jpg" alt="Wine Vendor" width="987"/></div> <?php }
    elseif (is_page(1338) ) {?>
    <div id="top">
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/category/WineBottle.jpg" alt="Wine Vendor" width="987"/></div> <?php }
    else {?>
    <div id="top">
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/category/WineTasting.jpg" alt="wine tasting" width="987"/></div> <?php }
    }

    ?>

    Although the code for the top pages all work but none of the code in the bottom snippet works. It doesn't work if I am testing for page templates, for page ids or try to set a default image for single.php or any of the pages. I have tried hard coding the div and image link directly into custom templates but it doesn't work there either. I am really bonking my head on the desk over this one. Any suggestions are much appreciated.

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183