Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author metaphorcreations

    (@metaphorcreations)

    If you are using the direct function to embed in a template file you can use the following:

    <?php
    if( !is_front_page() ) {
      if(function_exists('ditty_news_ticker')){ditty_news_ticker(940);}
    }
    ?>

    If you are using a shortcode or widget you would only be able to hide through css (unless you have another plugin that helps display specific widgets on specific pages):

    .home .mtphr-dnt {
      display: none;
    }
    Thread Starter investacube

    (@investacube)

    Hi @metaphorcreations, thanks for the both the great plugin and the code. I put the code into my header.php and it worked but in reverse. Want I want is for the ticker to show on all my pages except my home page. The code made it show on my home page but nowhere else. Sorry to create extra work but could you alter the code for me please? Thanks again.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    You’re welcome!

    Make sure you have the ! in the if statement.

    if( !is_front_page() ) {
    }

    The ! means “not”. So, the statement is saying “if not the front page, show the ticker”.

    Alternately, you could use:

    <?php
    if( is_front_page() ) {
    } else {
      if(function_exists('ditty_news_ticker')){ditty_news_ticker(940);}
    }
    ?>

    But, the initial version is cleaner and shorter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide from home page’ is closed to new replies.