• Resolved Webamaze

    (@webamaze)


    With the previous version of Ditty I inserted the direct function code into my header.php:

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

    This doesn’t seem to be available with the new version so I am still using the legacy version of Ditty.

    Will this be made available for the next update please?

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

    (@metaphorcreations)

    This can be done with the new Ditty using:

    <?php
    if ( function_exists( 'ditty_render' ) ) {
      echo ditty_render( array( 'id' => DITTY_ID_HERE ) ); 
    }
    ?>

    The reason this is not featured with Ditty is that there is now a Global Ditty option that allows you to insert a Ditty anywhere on your site without having to use a direct function. Go to Ditty > Settings > Global Ditty. You do need provide and HTML selector that tells the code where to place the Ditty, but other than that you just select your Ditty and it’ll appear on your site. Here is a quick screencast I made showing how to do this: https://www.loom.com/share/b358fc4c3d364d5db4db7bd9dffc28a8

    Let me know if you have any other questions. Thanks!

    I installed new Ditty but still running legacy. I have the following code in the file…
    Total Child: Theme Header (header.php). Which was copied from “Direct Function” that is displayed when editing legacy ticks. Can you tell me the steps for deactivating legacy Ditty and begin using the new version of Ditty and still have the ticks appear on the top of every page on my site https://www.lppcmin.org/. I do not understand how to find the HTML element needed for the new Ditty Global Settings.

    `<head>

    <?php if(function_exists(‘ditty_news_ticker’)){ditty_news_ticker(426);} ?>

    <meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
    <link rel=”profile” href=”https://gmpg.org/xfn/11″&gt;
    <?php wp_head(); ?>
    </head>

    Plugin Author metaphorcreations

    (@metaphorcreations)

    To disable Ditty News Ticker got to Ditty > Settings > Advanced and uncheck the Enable Ditty News Ticker (Legacy code) checkbox. The menu item for News Tickers will be removed the next time the page is refreshed.

    You will still need to manually remove the legacy DNT code you have added to your header.php file after this.

    I checked out your site and you should use the following in the HTML Selector field for a Global Ditty: #outer-wrap

    Then select Before Element as the Position of the Ditty.

    Choose the Ditty you want to use and then Save Settings. That should be all you have to do.

    Let me know if you have any further questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Direct Function’ is closed to new replies.