1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How Hide/show Code On The Different Pages

Discussion in 'Bookmarking Discussions and More' started by Sv9t, Jul 12, 2015.

  1. Sv9t

    Sv9t Active Member

    Hi! I want to show slider only on the pages Popular Upcoming Latest All, on other pages to hide it. How hide/show code <div>..</div>?
     
    Last edited: Jul 12, 2015
  2. valMETNG

    valMETNG Administrator Staff Member Admin

    I'm sorry but I don't understand. What do you mean by "slider?"
     
  3. Sv9t

    Sv9t Active Member

    I mean "carousel"
     
  4. valMETNG

    valMETNG Administrator Staff Member Admin

    Ah. To do that, you'd have to look at the $h->pageName value (e.g., "all," "popular," "upcoming"). So you'd create an if statement in the appropriate place (e.g., line 103 of your index.php file in your custom theme directory) like this:
    Code:
    <?php if ($h->pageName == 'popular') { ?>
         <div>carousel code goes here</div>
    <?php } ?>
     
    shibuya246 and Sv9t like this.
  5. Sv9t

    Sv9t Active Member

    ok, i used code:
    Code:
    <?php if ($h->pageName == 'popular' || $h->pageName == 'upcoming' || $h->pageName == 'all' || $h->pageName == 'latest') { ?>
    ...
    <?php } ?>
     
    shibuya246 likes this.

Share This Page