Results 1 to 10 of 66

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    17
    Plugin Contributions
    0

    Default How do i make banner ads appear on the front page only?

    I want to display banner ads in Header position 3, but i only want to show them on the home page of my website. Is there a simple piece of html code i can insert into the banner ad to hide it on all other pages?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How do i make banner ads appear on the front page only

    No. But if you mean banner set 2 in the header, then you can change this
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
    to this
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2) && $this_is_home_page) {
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jul 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: How do i make banner ads appear on the front page only

    Thanks for the reply, but it is definately Header position 3 that i want to show on the main page only - any thoughts?

    Thanks in advance

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How do i make banner ads appear on the front page only

    Although described as header position 3 in Admin > Configuration > Layout Settings, banner group set3 is actually displayed in the center panel. You can make this for the home page only by making a similar change to that explained above in your tpl_main_page.php.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Jul 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: How do i make banner ads appear on the front page only

    I will definately try this, but can you please advise exactly what i need to change to achieve hiding banner set 3 on the main page - i have copied the text below from the tpl_main_page.php file, forgive my lack of knowledge, i m still in the process of learning about all this stuff

    Many Thanks in advance



    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }


    $header_template = 'tpl_header.php';
    $footer_template = 'tpl_footer.php';
    $left_column_file = 'column_left.php';
    $right_column_file = 'column_right.php';
    $body_id = ($this_is_main_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
    ?>
    >
    RecordCount() > 0) {
    ?>




    get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>

    trail(BREAD_CRUMBS_SEPARATOR); ?>RecordCount() > 0) { ?> size('upload') > 0) echo $messageStack->output('upload'); ?> RecordCount() > 0) { ?>

    get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');?>

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How do i make banner ads appear on the front page only

    In default Zen Cart you would find the line in your tpl_main_page.php that is identical to the line to which I referred in my original post, except for referring to SET3 instead of SET2 and make the change that I recommended.

    However, this line is not amongst the sample that your posted from your tpl_main_page.php file. This could mean that you haven't posted it all (it does look rather sparse) or that you are using a template whose author has removed it. Are you displaying this banner now?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. v154 Make Category description only appear on page 1?
    By Feznizzle in forum General Questions
    Replies: 3
    Last Post: 1 Oct 2015, 09:48 PM
  2. Replies: 1
    Last Post: 14 Mar 2012, 03:31 AM
  3. Better arrangement for my 4 Banner Ads at the bottom of Front Page
    By AZUKI in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Nov 2007, 05:09 PM
  4. How do I make my logo only appear on the main page
    By CafePrima in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 27 Oct 2007, 07:00 PM
  5. How do I make the 'Best Sellers' box appear on every page?
    By Winks in forum Basic Configuration
    Replies: 1
    Last Post: 15 Mar 2007, 03:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg