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

    (@metaphorcreations)

    Sure. I’m assuming you’ve place the direct function in your header.php or some other file? If so, wrap that code in:

    if( is_front_page() ) {
      // direct function code goes here
    }
    Thread Starter Dan14

    (@dan14)

    Thank you for your quick reply. My coding knowledge is fairly limited. It is in the header.php, yes. I followed what you suggested and it did not work. I am assuming I did not wrap it correctly. I typed the code and placed the direct function after the //. It widen the line of the streaming news ticker and reflected on all pages.

    My theme is twentyfourteen.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Put the direct function on the line below the //.
    The // makes anything after it a comment, so it is not actually code anymore.

    Thread Starter Dan14

    (@dan14)

    Thank you for the reply. It does not seem to work I tried pasting it in header.php and functions.php but it did not fix the issue. I am assuming I am doing it wrong. Can you please tell me exactly what to copy and where to place it? I am sorry for my lack of knowledge.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    I can’t say exactly where you should put it, but it needs to be in one of your template files and not the functions.php file. If you want a specific ticker to display in your header, you’d place the code in your header.php file… if you want it in your footer you’d place it in your footer.php file.

    This would be the exact code you’d use (you need to replace the ticker ID to one of your ticker ID’s)

    <?php
    if( is_front_page() ) {
      if(function_exists('ditty_news_ticker')){ditty_news_ticker(776);}
    }
    ?>
    Thread Starter Dan14

    (@dan14)

    Thank you. I will give it a shot and let you know if it was resolved.

    Thread Starter Dan14

    (@dan14)

    It works!! I just changed 776 to the ticker ID I have. Thank you for your professional approach and perfect solution!!

    Plugin Author metaphorcreations

    (@metaphorcreations)

    You’re welcome! Glad to help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Limiting ticker to homepage’ is closed to new replies.