It’s hard to say what may be happening as I don’t have any experience with the theme you are using. I do know that normally an “infinite scroll” and the scrolling feature of Ditty News Ticker are different types of functionality. An infinite scroll would load more content (probably posts) onto a page as you scroll down a page. The Ditty News Ticker scrolling is a scrolling news ticker that recycles the same content over and over again.
In any case, the the Ditty News Ticker should still work, unless the content of your theme is being loaded via ajax (after page load). The ticker needs to be present and available on page load in order to start the javascript necessary to run the ticker. It’s also possible there is some other javascript error happening on your site that is stopping the Ditty scripts from starting.
If you can provide a URL to check out the page where your ticker should be I can take a look and possibly come up with some different ideas or direction.
Thank you for your prompt answer. The site I’m trying to set up is on my computer, so I can’t provide a link.
The demo for the theme I want is here: https://demo.wpzoom.com/?theme=tribune – their infinite scroll is very much like yours, that’s why I hope it will work.
And the code php file is like this:
<?php
$loop = new WP_Query( array(
'post__not_in' => get_option( 'sticky_posts' ),
'posts_per_page' => option::get( 'breaking_number' ),
'meta_key' => 'wpzoom_is_breaking',
'meta_value' => 1
) );
?>
<?php if ( $loop->have_posts() ) :?>
<div id="news-ticker">
<div class="news-ticker-container">
<dl id="ticker">
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<dt><?php echo time_ago(); ?> </dt>
<dd><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></dd>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</dl>
</div>
</div><!-- #news-ticker -->
<?php endif; ?>
What I tried was to replace the <dt> and <dd> lines with the code generated by the Dity plugin:
<?php if(function_exists('ditty_news_ticker')){ditty_news_ticker(3336);} ?>
Thanks for the further explanation. Try replacing the whole set of code you pasted above (instead of just the dt & dd lines) with the direct function of the Ditty News Ticker.
Let me know if that helps.
It worked like magic! Thank you very much for your quick and efficient support!
I only have to figure out how to display the posts titles on the ticker, instead of their URLs, as it does now.
ticker1 text: http://mysite.com/post1/
ticker1 link: http://mysite.com/post1/
and
ticker2 text: http://mysite.com/post2/
ticker2 link: http://mysite.com/post2/
Or maybe this is not possible and I have to input manually the text that scrolls?
Great, glad it’s working.
You just need to add the Title to the “Text” field as opposed to the URL that you are currently using. So:
ticker1 text: Post Title 1
ticker1 link: http://mysite.com/post1/
Thank you very much for your valuable support. All my questions have been answered and I’m going to rate your plugin 5 stars.
You’re welcome! Thanks for the rating!