Advertisement:

Author Topic: Wizards Theme Show Header Banner Also for Item Pages  (Read 394 times)

muratbora

  • Full Member
  • ***
  • Posts: 234
Wizards Theme Show Header Banner Also for Item Pages
« on: July 17, 2018, 05:47:31 pm »
Osclass wizards theme has a header banner section, but this shows banner only into homepage..
How to show banner in categories / item pages, too...?

here below code, can you please help me to modify it?

************************

  <?php
   //   if( osc_is_home_page() ) {
        if( 1 == 1 ) {
//      if(osc_get_preference('show_banner', 'osclasswizards_theme')=='1'){
      if(osc_is_home_page() && osc_get_preference('show_banner', 'osclasswizards_theme')=='1'){         echo '<div id="header_map">';
         if(homepage_image()) {
            echo homepage_image();
         } else {
         
            echo '<img src="'.osc_current_web_theme_url('images/banner.jpg').'" />';

         }
         echo '</div>';
      }
?>

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
Re: Wizards Theme Show Header Banner Also for Item Pages
« Reply #1 on: July 17, 2018, 09:54:14 pm »
Hello,

The code should look like this (I've removed commented lines, no need for them):

Code: [Select]
<?php
if(osc_get_preference('show_banner''osclasswizards_theme')=='1'){
    echo 
'<div id="header_map">';
    if(
homepage_image()) { 
        echo 
homepage_image(); 
    } else {
        echo 
'<img src="'.osc_current_web_theme_url('images/banner.jpg').'" />';
    } 
    echo 
'</div>';
}
?>



Regards.

muratbora

  • Full Member
  • ***
  • Posts: 234
Re: Wizards Theme Show Header Banner Also for Item Pages
« Reply #2 on: July 18, 2018, 04:54:28 pm »
I have replaced code as yours, site started not opening, it does not work!

WEBmods

  • Hero Member
  • *****
  • Posts: 937
  • github.com/webmods-croatia/love-osclass/ | patrick
Re: Wizards Theme Show Header Banner Also for Item Pages
« Reply #3 on: July 19, 2018, 12:23:13 am »
Sorry to hear that. Check for errors in the debug.log file (https://doc.osclass.org/Debug_PHP_errors). The code seems fine, no syntax errors as far as I see.

Regards.