Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by swguy View Post
    Try wrapping this logic in

    if ($this_is_home_page) {
    ...
    The opening bracket is missing in your conditional statement..

    Quote Originally Posted by Kevin205 View Post
    I tried
    Code:
    <?php
      if (($this_is_home_page) && SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
        if ($banner->RecordCount() > 0) {
    ?>
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #12
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    I am using banner 3 for.

    What do you mean wrong banner?
    Using Zen Cart 1.5.1

  3. #13
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by DivaVocals View Post
    The opening bracket is missing in your conditional statement..
    Where would the } close?
    Using Zen Cart 1.5.1

  4. #14
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by Kevin205 View Post
    I am using banner 3 for.

    What do you mean wrong banner?
    I meant different banner, but try the code I posted but for your chosen banner number of course.

  5. #15
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by picandnix View Post
    I meant different banner, but try the code I posted but for your chosen banner number of course.
    Quote Originally Posted by picandnix View Post
    wrong banner?

    PHP Code:
    <?php
      
    if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET4 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET4))) {
    I tried the following:
    PHP Code:
    <?php
      
    if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET3 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET3))) { 
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>
    No it does not work. Thank you.
    Using Zen Cart 1.5.1

  6. #16
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by DivaVocals View Post
    The opening bracket is missing in your conditional statement..
    PHP Code:
    <?php
    if ($this_is_home_page) { 
      if (
    SHOW_BANNERS_GROUP_SET3 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET3)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    }
    ?>
    Unless, I have written it wrong, it is not good.
    Using Zen Cart 1.5.1

  7. #17
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Name:  Image 6.jpg
Views: 81
Size:  18.5 KB

    I just found out something, when I place the Wide-Banner to Header Position 3, and with the following code, it works.

    PHP Code:
    <?php
    if ($this_is_home_page) { 
      if (
    SHOW_BANNERS_GROUP_SET3 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET3)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    }
    ?>

    Banner shows up in Header Position 3 on the index page and NOT on all other pages. (The code works)

    But, the Footer Position 3 Wide-Banner shows up on all pages.

    How is the footer section controlled?
    Using Zen Cart 1.5.1

  8. #18
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    Problem solved.

    It is SHOW_BANNERS_GROUP_SET6 and not SHOW_BANNERS_GROUP_SET3

    PHP Code:
    <!--bof- banner #6 display -->
    <?php
    if ($this_is_home_page) { 
      if (
    SHOW_BANNERS_GROUP_SET6 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET6)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    }
    ?>
    <!--eof- banner #6 display -->
    It works fine now.

    Thank you picandnix, swguy and DivaVocals.
    Using Zen Cart 1.5.1

  9. #19
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Can I put some html content on the first page only?

    By the way Ajeh's and picandnix's original suggestion works fine also. The numbers got me confused. In the admin I think it should be called positions 1 through 6. But I am sure there are a lot of other things to consider!

    PHP Code:
    <!--bof- banner #6 display -->
    <?php
      
    if ($this_is_home_page && SHOW_BANNERS_GROUP_SET6 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET6)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>
    <!--eof- banner #6 display -->
    That was a nice 5 hours.
    Last edited by Kevin205; 10 May 2013 at 11:38 PM.
    Using Zen Cart 1.5.1

  10. #20
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Can I put some html content on the first page only?

    Quote Originally Posted by Kevin205 View Post
    That was a nice 5 hours.
    Well done

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. In an EZ-Page, can I put a link to a popup of other content?
    By cstahlhut in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Aug 2012, 09:46 AM
  2. How to put the content below images on the home page?
    By ashadweb in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Sep 2010, 11:29 AM
  3. Can I put sidebox content into an EZ-Page?
    By makenoiz in forum General Questions
    Replies: 1
    Last Post: 8 Feb 2010, 03:10 AM
  4. Trying to add custom HTML content to the index page only.
    By inthecomputer in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 23 Jun 2008, 11:04 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