[Resolved] Ticker location PHP / Short code

Home Forums Support [Resolved] Ticker location PHP / Short code

Home Forums Support Ticker location PHP / Short code

  • This topic has 8 replies, 2 voices, and was last updated 4 years ago by David.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #844167

    Hi Guys

    I am using the Ditty News Ticker for my site. I am looking at placing it in the top bar.
    Is there a reliable way of adding either PHP or Shortcoding.
    I have tried adding custom HTML widget but it will not show the ticker. At the moment I have it showing it the top content area of the home page only.

    Here is the PHP that the Ditty plugin is giving me

    <?php if(function_exists('ditty_news_ticker')){ditty_news_ticker(2563);} ?>

    BTW – I have my addtoany social icons in top bar. I am not worried if I have to remove them for the styling. Also, not sure if the top bar GB color if affecting it. I have changed it to #ffffff but it still did not show the ticker

    Customer Support

    Hi there,

    does the plugin provide a shortcode? if so that should work within a HTML widget.

    If not then you can use a Hook to add the php, but it would have to be above the top bar by using the before_header hook:



    Hi David

    Yes that worked thank you. Both with shortcode and PhP. I have used the PhP code in my first post.

    I have set site wide and all users in the hook as the login is disabled anyway (read only site no comments).

    Is there a way I can centre it, add padding, change colours etc ?


    By the way, above header puts it between header and top bar, not over the top bar


    Sorry, last post should read “before header”

    Customer Support

    So in the hook element –> priority field set this to a lower number, i think 5 should do it, worst case change it to zero and it should appear above the topbar.

    Styling it with some CSS:

    .mtphr-dnt-tick-container {
        text-align: center;
        padding: 10px 0;

    Super dooper. That worked great thank you David.
    Decided to leave it where it is. Stands out a little better.

    I can mess about with it now 🙂

    Great work as always thanks

    Customer Support
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.