How to create custom news ticker widget in wordpress

Are you create custom news/post/blog/notices/recent-article ticker widget? Create a custom news ticker widget by using jQuery. I show this how it will you create, this process is very simple, just follow our instruction. We used Advanced News Ticker is a jQuery plugin used to vertically scroll a group of html contents as a news ticker. Provides a lots of parameters and callbacks to make your own news ticker on the web page/app. Now Load the jQuery library and newsTicker.js script in your theme-function.php/function.php file or you can link your header.php file. This plugin download from here Flexible jQuery Vertical News Ticker Plugin – Advanced News Ticker
Features:

  • 2 directions of movement. Up or down.
  • Automatically start scrolling on page loaded.
  • Automatically stop on mouse hover the news ticker elements.
  • Custom controls to perform start, pause, next and previous actions.

theme-function.php/function.php

### NOTICES TICKER ###
class notices_ticker extends WP_Widget {
function __construct() {
$widgets_opt = array(‘description’=>’Display Notices Ticker in widget for Sidebar’);
parent::__construct(false,$name= “BR Theme – Notices Ticker”,$widgets_opt);
}
function form($instance) {
global $post;
$title = isset( $instance[‘title’] ) ? esc_attr( $instance[‘title’] ) : ”;
$readmore = isset( $instance[‘readmore’] ) ? esc_attr( $instance[‘readmore’] ) : ”;
$more_link = isset( $instance[‘more_link’] ) ? esc_attr( $instance[‘more_link’] ) : ”;

?>
<p><label for=”<?php echo $this->get_field_id(‘title’); ?>”>Title:
<input id=”<?php echo $this->get_field_id(‘title’); ?>” name=”<?php echo $this->get_field_name(‘title’); ?>” type=”text” class=”widefat” value=”<?php echo $title;?>” /></label></p>
<p><label for=”<?php echo $this->get_field_id(‘readmore’); ?>”>All News Text:</label>
<input id=”<?php echo $this->get_field_id(‘readmore’); ?>” name=”<?php echo $this->get_field_name(‘readmore’); ?>” type=”text” class=”widefat” value=”<?php echo $readmore;?>” /></p>
<p><label for=”<?php echo $this->get_field_id(‘more_link’); ?>”>All News Link:</label>
<input id=”<?php echo $this->get_field_id(‘more_link’); ?>” name=”<?php echo $this->get_field_name(‘more_link’); ?>” type=”text” class=”widefat” value=”<?php echo $more_link;?>” /></p>
<?php
}
function update($new_instance, $old_instance) {
return $new_instance;
}
function widget( $args, $instance ) {
global $post;
extract($args);
$title = apply_filters(‘widget_title’, $instance[‘title’]);
$readmore = apply_filters(‘readmore’, $instance[‘readmore’]);
$more_link = apply_filters(‘more_link’, $instance[‘more_link’]);

echo $before_widget;
?>

<div class=”notice-items-ticker”>

<?php

if ( $title )
echo $before_title . $title . $after_title;

?>
<i class=”fa fa-arrow-up” id=”notice-items-ticker-prev”></i> <i class=”fa fa-arrow-down” id=”notice-items-ticker-next”></i>
<script type=”text/javascript”>
jQuery(function() {
jQuery(‘#notice-items-ticker-list’).newsTicker({
row_height: 70,
max_rows: 5,
duration: 4000,
prevButton: $(‘#notice-items-ticker-prev’),
nextButton: $(‘#notice-items-ticker-next’)
});
});
</script>
<ul id=”notice-items-ticker-list”>

<?php
$query = ‘post_type=notices&posts_per_page=5&order=DESC’;
query_posts($query);
if (have_posts()) :
while (have_posts()) : the_post(); ?>

<li class=”notice-item”>

<div class=”notice-title”><h6><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h6></div>
<div class=”notice-published-date”><p><?php the_time(‘F j, Y’) ?></p></div>

</li>
<?php endwhile; endif; wp_reset_query(); ?>

</ul>
<?php if ( $more_link && $readmore )
echo ‘<div class=”all-news”><a href=”‘.$more_link.'” class=”more-link”>’.$readmore.'</a></div>’;
echo ‘</div>’;
echo $after_widget;
}
}
add_action(‘widgets_init’, create_function(”, ‘return register_widget(“notices_ticker”);’));

75 Responses to “How to create custom news ticker widget in wordpress”

  1. viz says:

    I appreciate you sharing this blog article. Much obliged.

  2. here are some links to websites that we link to because we believe they’re worth visiting

  3. LeilaRed says:

    is mieux

    bfcf is australia import

  4. JasonThync says:

    Recently I have come across one article which I think you might find helpful. Somebody may take a steaming dump all over it, but it answered some of my questions.
    essay writing help

  5. that will be the finish of this post. Here youll come across some websites that we assume youll value, just click the links over

  6. An outstanding share! I’ve just foorwarded this onto a colleague who has
    been doinhg a litttle homework on this. And he actually ordered me lunch due too the fact that I discovered it for him…

    lol. So allow me to reword this…. Thanks for the meal!!
    But yeah, thanks for spending some time to talk about this topic here oon your web site.

  7. whoah this weblog is wonderful i love studying ykur posts.
    Keep up the good work! You understand, many pertsons
    are looking roound foor this info, you could help hem greatly.

  8. Thanks for the marvelous posting! I genuionely
    enjoyed reading it, you may be a great author.
    I will be sure to bookmark your blog and definitely will come back later in life.
    I want to encourag that you continue your
    great posts, have a nice afternoon!

  9. sisli escort says:

    Wow, that’s what I was seeking for, what a stuff!
    existing here at this website, thanks admin of this site.

  10. viz says:

    Say, you got a nice blog post.Thanks Again.

  11. Hot live says:

    the time to read or check out the content or sites we have linked to beneath the

  12. viz says:

    I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  13. cocuk porno says:

    Say, you got a nice blog post.Thanks Again.

  14. 19 yas porno says:

    I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  15. 20 yas porno says:

    I cannot thank you enough for the post.Really looking forward to read more. Cool.

  16. 20 yas porno says:

    I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  17. Incredible story there. What happened after? Thanks!

  18. Tumblr says:

    Very beautiful and well written article

  19. I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! ))) What do you say to my new landing page ? https://www.youtube.com/watch?v=mnYVOnxk82E

  20. You should take part in a contest for one of the best blogs on the web. I will recommend this site!

  21. A big thank you for your blog article.Thanks Again. Want more.

  22. Say, you got a nice blog post.Thanks Again.

  23. Hey There. I discovered your blog the use off msn. That is an extremely smaetly written article.
    I will be sure to bookmark it and return to learn more off your
    useful information. Thanks for the post. I will definitely return.

  24. I cannot thank you enough for the post.Really looking forward to read more. Cool.

  25. You made some decent points there. I looked on the internet for the issue and found most individuals will go along with with your website.

  26. Excellent goods from you, man. I have understand your stuff previous to and you are just too wonderful. I actually like what you’ve acquired here, certainly like what you’re saying and the way in which you say it. You make it enjoyable and you still care for to keep it sensible. I cant wait to read far more from you. This is actually a great site.|

  27. cocuk porno says:

    A big thank you for your blog article.Thanks Again. Want more.

  28. sex izle says:

    Say, you got a nice blog post.Thanks Again.

  29. Incredible points. Outstanding arguments. Keep up the great spirit.|

  30. cocuk porno says:

    I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  31. great job. thank you for the article

  32. sex izle says:

    Say, you got a nice blog post.Thanks Again.

  33. porno cocuk says:

    Thank you for your blog article.Really looking forward to read more. Will read on…

  34. fuck google says:

    Contrary to many views, better researched articles still fetch in reviewers like me. You demonstrated clear understanding of the subject matter and my sentiments are now complete after reading your post. Please hold up the solid work and i will subscribe to your rss feed to be advised of any future postings.

  35. sex izle says:

    Say, you got a nice blog post.Thanks Again.

  36. porno cocuk says:

    Thank you for your blog article.Really looking forward to read more. Will read on…

  37. I cannot thank you enough for the post.Really looking forward to read more. Cool.

  38. sex izle says:

    Thank you for your blog article.Really looking forward to read more. Will read on…

  39. fuck google says:

    I really enjoy this template youve got going on on your site. What is the name of the theme by the way? I was thinking of using this style for the web site I am going to make for my school project.

  40. cocuk porno says:

    Thank you for your blog article.Really looking forward to read more. Will read on…

  41. pornom says:

    I cannot thank you enough for the post.Really looking forward to read more. Cool.

  42. A big thank you for your blog article.Thanks Again. Want more.

  43. pornom says:

    I appreciate you sharing this blog article. Much obliged.

  44. I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  45. I cannot thank you enough for the post.Really looking forward to read more. Cool.

  46. Thank you for your blog article.Really looking forward to read more. Will read on…

  47. I appreciate you sharing this blog article. Much obliged.

  48. Thank you for your blog article.Really looking forward to read more. Will read on…

  49. Thank you for your blog article.Really looking forward to read more. Will read on…

  50. porno cocuk says:

    I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  51. porno cocuk says:

    I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  52. Hmm is anyone else experiencing problems with the pictures on this blog loading? I’m trying to find out if its a problem on my end or if it’s the blog. Any responses would be greatly appreciated.|

  53. I cannot thank you enough for the post.Really looking forward to read more. Cool.

  54. Thank you for another informative blog. Where else could I get that kind of information written in such a perfect way? I’ve a project that I’m just now working on, and I’ve been on the look out for such info.

  55. I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  56. I cannot thank you enough for the post.Really looking forward to read more. Cool.

  57. Teri Lawin says:

    Thanks for your article. What I want to point out is that when searching for a good on-line electronics go shopping, look for a website with complete information on key elements such as the security statement, safety details, any payment options, and also other terms and also policies. Constantly take time to investigate the help and FAQ areas to get a superior idea of what sort of shop will work, what they are capable of doing for you, and how you can make use of the features.

  58. I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  59. I appreciate you sharing this blog article. Much obliged.

  60. Good post, thank you. I just signed up to RSS on this blog.

  61. I cannot thank you enough for the post.Really looking forward to read more. Cool.

  62. I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  63. I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  64. Thanks a lot for taking the time to discuss this, I feel strongly about it and love learning more on this subject. If possible, as you gain expertise, would you mind updating your web site with more information? It is extremely helpful for me. My best wishes, Willodean.

  65. Thank you for your blog article.Really looking forward to read more. Will read on…

  66. google says:

    A big thank you for your blog article.Thanks Again. Want more.

  67. google says:

    I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

  68. Thank you for your blog article.Really looking forward to read more. Will read on…

  69. google says:

    I appreciate you sharing this blog article. Much obliged.

  70. Thank you for your blog article.Really looking forward to read more. Will read on…

  71. Funny Beard says:

    It is perfect time to make some plans for the future and it is time to be happy.
    I have read this post and if I could I want to suggest you
    few interesting things or tips. Maybe you could
    write next articles referring to this article. I desire to read more
    things about it!

  72. Thank you for your blog article.Really looking forward to read more. Will read on…

  73. Thank you for your blog article.Really looking forward to read more. Will read on…

  74. I appreciate you sharing this blog article. Much obliged.

  75. I cannot thank you enough for the blog post.Really looking forward to read more. Awesome.

​Leave a Comment

Comment authors age:




how to create a button in tinymce editor for insert custom shortcode in wordpress

how to add a button for back in the blog page from single blog page in WordPress