skip to Main Content

I have a box ad in a <div> that I have put in index.php but it’s showing up in almost all the other pages.

Which file do I need to edit or put this box ad in so that it is only visible on the home page and not on other pages?

4

Answers


  1. Chosen as BEST ANSWER

    Well i found the answer

    if ( basename($PHP_SELF) == FILENAME_DEFAULT && $cPath==null) {
    

  2. Give the body of your index.php an extra class. For example contentindex. Also, provide your ad-div with an extra style element:

    <div class="contentindex" style="display:none;"/>
    

    And in your css it should be something like:

    .contentindex ad { 
        display: inline;
    }
    

    Work with parents and children.

    But why do you want this? If it’s not allowed to be visible, why is it the div there in the first place?

    Login or Signup to reply.
  3. Even thought its not proper you can edit the language template since it allows HTML.

    It’s in catalogincludeslanguagesenglishindex.php You could use:

    define('TABLE_HEADING_NEW_PRODUCTS', 'Your content here.<br />New Products For %s');
    

    Or something similar.

    Login or Signup to reply.
  4. Add it to the bottom of the index.php file in the catalog folder. Below

    <?php
      } else { // default page
    ?>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search