How to Show Recent Posts with NewsTicker Effect in WordPress Sidebar

How to Show Recent Posts with NewsTicker Effect in WordPress Sidebar
  • 6 June 2009
  • Tutorials, WordPress
  • This post was written exclusively for PV.M Garage by marbio
  • Comments (31)»

With this little tutorial I want to illustrate the way in order to show recent articles with newsticker effect on the sidebar of your wordpress blog. The term “newsticker” refers to a small section of the page in which we can read the last news (the last ones post in this case) with the typical sliding effect of the on-line magazine.
The execution of this script demands to edit some files of your template, therefore it is better idea a backup copy of the theme folder.

Recent Posts with NewsTicker Effect

Step 1 – Creation of the module style

The following portion of code contains the style CSS of the recent-post-newsticker module. We can insert the following code directly in the main style sheet of the template (style.css) or create a new file .css (newsticker.css).

#listticker{/*general settings*/
padding:6px 6px 6px 6px;
#listticker ul{/*list general settings*/
#listticker li{/*single list element settings*/
border:dashed 1px #dddddd;
#listticker a{/*link settings*/

This code is customizable to follow the design of your blog. With the example configuration we will obtain the following one rendering.
Articoli recenti con effetto newsticker
Now we create a folder post_newsticker where insert the eventual style sheet file if it has been chosen this road. Inside the folder post_newsticker we insert also the file jquery.js, it referers to JQuery base library, the Javascript framework used to recreate the sliding effect.
Now we are ready to transfer on the server and just inside the directory of template graphical the folder containing post_newsticker files.

Step 2 – Modification of the header.php file

With this modification we recall the files previously loaded. The following portions of code will be inserted inside of the tag head. If you choose to use a dedicated css file for the style insert this:

<link rel="stylesheet" href="<?php bloginfo('template_directory'); >/post_newsticker/newsticker.css" type="text/css" />

Now insert the jQuery library reference.

<script src="<?php bloginfo('template_directory'); >/post_newsticker/jquery.js" type="text/javascript">

Therefore insert the javascript code in order to realize the sliding effect on the articles list.

<script type="text/javascript">

	var first = 0;
	var speed = 500;
	var pause = 3000;

		function removeFirst(){
			first = $('ul#listticker li:first').html();
			$('ul#listticker li:first')
			.animate({opacity: 0}, speed)
			.fadeOut('slow', function() {$(this).remove();});

		function addLast(first){
			last = '
	<li style="display:none" mce_style="display:none">'+first+'</li>
			$('ul#listticker li:last')
			.animate({opacity: 1}, speed)

	interval = setInterval(removeFirst, pause);

With the speed and pause variables we can modify respective element refreshing velocity and the pause between the various refreshments. To this point we must connect the n last posts of the blog to the list elements.

Step 3 – Modification of the sidebar.php file

In order to obtain the list of n last posts we can use the native functions in Wordpress that refer to posts management.

<h2> Articoli recenti</h2>
<ul id="listticker">
 $lastposts = get_posts('numberposts=10');
 foreach($lastposts as $post) :
 <a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></li>
 <?php endforeach; ?>

The code should follow the style of the page structure. The ul element have id=”listticker”.
We define the n number (that the newsticker list contains) of the posts with “numberpost” variable.


To this point the recent-post-newsticker has been correctly installed.

A great part of the material for this module has been recovered on Woork (Antonio Lupetti’s tech blog) in the following article ” How to implement a news ticker with jQuery and ten lines of code “.

If you have any suggestions or ideas to improve the module write a comment to the post.

Author: marbio

Fabio Marasco is a student almost Engineer. A Web lover who follow and live all its developments. Supporter of the Open Source philosophy, Linux user (Ubuntu distro). Read or follow Fabio on twitter.

website design and development


  1. Mike

    thanks for this!

  2. Luis Rivera

    Hi its a great work i really follow woork.blogspot and try to do something like this but have a error here*
    <script src=”

  3. Luis Rivera

    sorry i see that dont show in my last comment jQuery library reference. has an error are a missed ?

  4. piervix

    @Luis River: Hi Luis, rewrite your comment. It’s incomplete!

  5. Luis Rivera

    Hi ok i do that news ticker function in a web page that i was building but i see in the step 2 when need to put the jquery reference there are an error just take a look there. i can show the error here because i can put the script here but im gonna email you the corrected script .

  6. marbio

    Hi Luis. Can you email me the script?
    Do you have checked te jquery reference path is correct?

  7. House Help Desk


    I am Angela Rickson, I always read your blogs something everyday because I like your thought and I get many advice after read you article. I tell to my other friends about this site & its

  8. Vector images free download

    Woah! I’m really enjoying the template/theme of this blog. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between usability and visual appeal. I must say that you’ve done a excellent job with this. In addition, the blog loads super fast for me on Safari. Exceptional Blog!

  9. gorjupw

    poglejte si tole Rolerji

  10. belajk

    poglejte si tole Nahrbtniki MILLET

  11. Optiope

    корикова порно
    секс 20
    самое свежее порно
    просмотр порно клипов
    живое порно видео

  12. Optiope

    porn reply php forum
    порно галереи молодые оральный секс
    вреден ли секс
    эротика мультики
    любительский стриптиз видео

    Картинки телефон порно
    Груповой секс знакомства
    Пизда 12 летний
    Порно фото секс большие сиськи
    Латинское порно – домашнее парнуха видеоролик
    Анальный секс зрелых женщин
    Sex video elena berkova
    Голые жопы телок
    Тренинговый центр вагина
    Хёнтай порно
    Секс видео ролилики – домашнее порно видеоролик
    Порно tits
    Секс камера
    Клитор мамы
    Камера секс россия
    Cекс белово кемеровской
    Гей фото видео секс
    Letitbit sex
    Порно картинки японки
    Порно фото рабочих
    Порно фото любители оргии
    Порнофото группового секса
    Profession porn actress
    Женская эротика
    Порно минет сперма
    Просмотр порно без кодов
    Авто секс – смотреть девушки видеоролик
    Русификатор anti porn
    Любовь секс фото
    Порнуха без регистрации
    Porn reply php t
    Япония секс гомосексуализм
    Белово секс
    Пизда мокрая
    Порно фото российских знаменитостей
    Редкое порно видео
    Секс натуралов
    Порно юнные
    Хабаровск фото секс
    Частный порно сайт
    Anal sex toys

    секс девушка сабака
    попки девки
    sms уроки эротики клип
    порно видео анальный секс
    порно ужасы
    порно world
    порно видео onlain
    фото сиськи размер
    баня секс мальчики
    секс туризм
    анекдот виртуальный секс
    жестокие порно фотки
    предложить девушке анальный секс
    порно видео киски
    видео аниме порно
    телки кинули парней
    дали эротика
    эротику 10 лет

  13. Optiope

    ïðîñìîòîð ïîðíî âèäåî
    ïîðíî åâðîïà
    ñìîòðåòü àíàëüíûé ñåêñ
    ïîðíî ôèëüì ïåðèñ õèëòîí
    ïîðíî áîëüøàÿ æåíùèíà áîëüøîé ñåêñ
    ïîïêè ðàêîì
    ìîðàëü ñåêñà 19 âåêà
    îòñóòñòâèå ñåêñ ãðîçèò
    áåçïëàòíî âèäåî 18
    ýðîòèêà ôîòî ïîäðîñòêè

    Çàðóáåæíîå ïîðíî
    Ýðîòèêà æåñòêîå ïîðíî
    Ãðóïïîâîé îðàëüíûé ñåêñ
    Ïîðíî fantasy
    Ïîðíî çðåëûõ âèäåîðîëèêè
    Ïîðíî áðèòíè ñïèðñ
    Ïîðíî ôîòî âèäåî
    Pilot ñåêñ
    Moscow porn
    Âèäåîïðèêîëû ñåêñ
    Erotika sex
    Ñåêñ âèäåî àëåíû âîäîíàåâîé
    Ïîðíî ñìîòðåòü
    Îáêàêàëñÿ ñåêñ
    Ñåêñ ñåðïóõîâ
    Äåâ÷îíêè ãîëûå òåëêè
    Ïîðíî öûïî÷êè – äîìàøíåå ñåêñ âèäåîôèëüì
    Www ïîäðîñòêè ïîðíî
    Ïîðíî âèäåî ìîëîäåíüêèõ äåâî÷åê
    Æåíùèíû 50 ôîòî ïîðíî
    Ftp ïîðíî ôèëüìû
    Ñåêñóàëüíûé êëèòîð
    Äèàíà ìåðèíîâà ñåêñè
    Ïîðíî çàñòàâêè êàðòèíêè
    Ïîðíî êðàñèâûå ïîïêè
    Ìóëüòÿøêè ïîðíî ñåêñ àíèìå – çðåë ïîðåâî ðîëèê
    Sex porn teen
    Ïîïêà mp3
    Ïåðâûé ðàç çàíÿòñÿ ñåêñîì
    Òþìåíü ñåêñ çíàêîìñòâà
    Ñåêñ ôîòî õóäûõ
    Âèäåî ðîëèêè ñàìñóíã – äîìàøíåå ïîðíî âèäåî
    Mp3 ñàéòû ëó÷øèå ïîðíóõè
    Ïîðíî ôåñòèâàëü
    Ôëåø ïðèêîëû ýðîòèêà
    Ñåêñ ïîðíî êëóáíè÷êà
    Ïèñüêà äåâî÷åê ôîòîãðàôèè
    Áîëüøàÿ ýíöèêëîïåäèÿ ñåêñà

    sex video
    õî÷ó ìóæ÷èíó ñåêñ
    äåâóøêè ëþáÿò àíàëüíûé ñåêñ
    movie ïîðíî
    ñåêñ ôîòî grex
    ñåêñ ïîðíî ãîëûå
    ïåðâûå óðîêè ñåêñà
    amateur porno
    àíèìå ñåêñ âèäåî
    ñåêñ òóðèçì ðèãà
    áåñ ïëàòíûé ñåêñ
    ïîðíî âèäåî private
    âèàãðà ñåêñ
    teen sex photo
    free video ãåðìàôðîäèò òðàíññåêñóàë
    æ¸ñòêèé ñåêñ âèäåî
    âèäåî ïîðíóõà ñåêñ
    ïîðíî âèäåî äîì 2
    âîñòî÷íîå ïîðíî
    ïîêàç ïèçäû

  14. Katherine Stone

    It was certainly interesting for me to read the article. Thank author for it. I like such topics and anything that is connected to them. I would like to read a bit more soon.

    Katherine Stone
    london indian massage

  15. asmawijaya@kaskus

    This website is known as a walk-by means of for all of the information you needed about this and didn’t know who to ask. Glimpse right here, and also you’ll definitely uncover it.

  16. Optiope


    [url=]Порно Берковой[/url]
    [url=]Фото Секс Сын Ебет Маму[/url]
    [url=]Дед Ебет Внучку Секс[/url]
    [url=]Смотреть Видео Попок[/url]
    [url=]Порево день студента[/url]
    [url=]Много порно роликов[/url]
    [url=]Порно фабрика звёзд[/url]
    [url=]Секс com[/url]
    [url=]Порно картинки лет[/url]
    [url=]Секс митино[/url]
    [url=]Порно оля[/url]
    [url=]Порно комиксы анимэ[/url]
    [url=]Бритни порно видео[/url]
    [url=]Home video sex[/url]
    [url=]Диффчёнки sex[/url]
    [url=]Секс анжелины джоли[/url]
    [url=]Гомель секс[/url]
    [url=]Секс бомба 1.1[/url]
    [url=]Www seks mail ru[/url]
    [url=]Просто сиськи[/url]
    [url=]Секс инфо[/url]
    [url=]Видео клипы про эротику[/url]
    [url=]Sex cmd[/url]
    [url=]Секс эротика голые девушки[/url]
    [url=]Год без секса[/url]
    [url=]Секс порно фото телок[/url]
    [url=]Видео ролики лезгинка[/url]
    [url=]Секс голых шлюх[/url]

  17. Free Articles

    Hi, I can’t understand how to add your site in my rss reader. Can you help me please?

  18. Optiope


    ïîðíî èíâàëèäû
    sex bbs php
    ñåêñ ïåêèí
    êàíàë ýðîòèêè
    ïîðíî ôîòî æàííà
    morrowind ïîðíî ïëàãèí
    áîëüøèå ñîñêè ïîðíî ôîòî
    êîí÷èíà òåëêè ôîòî
    ôîòî ñåêñ çíàìåíèòîñòåé êèíî ðîññèè
    hdtv porn

    [url=]Ñåêñ òðåíåð[/url]
    [url=]Åêàòåðèíáóðãñêèé ñåêñ ðóññêîå ïîðí âèäåî[/url]
    [url=]Ñåêñ ìàññàæ ïèòåð[/url]
    [url=]Ïðèêîëüíûé ñåêñ òåñò[/url]
    [url=]Êàðòà ñàéòà[/url]
    [url=]Êàðòà ñàéòà[/url]
    [url=]Ñåëüñêîå ïîðíî[/url]
    [url=]Ïîðíóõà ñàìàÿ êëàññíàÿ[/url]
    [url=]Ñèìåéíîå ïîðíî[/url]
    [url=]Áåñï ïîðíî ðóññêîå äåâî÷êè âèäåîôèëüì[/url]
    [url=]Ñåêñ ðåáåíêà[/url]
    [url=]Êàðòà ñàéòà[/url]
    [url=]Cåêñ òóðèçì[/url]
    [url=]Ïîðíî ôîòî ñïåðìà[/url]
    [url=]Ýðîòèêà âèäåî áåç êîäîâ[/url]
    [url=]Ñåêñ íàáîð ïîäàðêè[/url]
    [url=]Ñòàðóøêè áîëüøèå ñèñüêè îíëàéí ïîðíî âèäåîðîëèê[/url]
    [url=]Ñåêñ ôîòî õóäûõ[/url]
    [url=]Ïîðíî 3 çðåëûõ ýðîòèêà âèäåîôèëüì[/url]
    [url=]3d ñåêñ ñèìóëÿòîð ñàéò õõõ ðîëèê[/url]
    [url=]Ïîðíî ïàëü÷èêè[/url]
    [url=]Ñåêñ ôîòî æåñòêîå ïîðíî çðåëûõ ýðîòèêà âèäåîðîëèê[/url]
    [url=]Tina turner eros[/url]
    [url=]Sex mit[/url]
    [url=]Çïïï îðàëüíûé ñåêñ[/url]
    [url=]Êàðòà ñàéòà[/url]
    [url=]Ðóññêèå ïîïêè[/url]
    [url=]Êàðòà ñàéòà[/url]
    [url=]Èãðà ero ãîëàÿ äåâóøêè âèäåî[/url]
    [url=]Ïîðíî âèäåî áåðêîâà ðóññêîå ïîðíóõà âèäåîðîëèê[/url]
    [url=]Ãðóïîâîé ñåêñ çíàêîìñòâà[/url]
    [url=]Ñåêñ õåðñîí[/url]

    want sex biz
    âèäåî ëèçáèÿíîê ïîðíî
    ïðèêîëû ýðîòèêà êëèïû
    ãåìîððîé ñåêñ ôîòî
    best porno video
    ïîðíî åêàòåðèíà âòîðàÿ
    ãðÿçíûå ïîðíî ôîòî
    sex ïîðíóõà
    ñåêñ çíàêîìñòâî áåç ðåãèñòðàöèè
    äåøåâûé ñåêñ
    ñåêñ äåâ÷îíêè
    âîòêèíñê ñåêñ
    ñåêñ îëüãà áóçîâà
    êðàñíîÿðñê èíòèì ñåêñ ñåìåéíûå ïàðû
    ñåêñ ôîòî ðó

  19. scrapebox

    There are a lot of strange comments on here. People must be using SCRAPEBOXLIST.COM

  20. aqua aerobics when pregnant

    no matter what you are saying, you got it

  21. indo online

    I was very pleased to seek out this web-site.I wanted to thanks on your time for this glorious read!! I positively having fun with each little little bit of it and I’ve you bookmarked to check out new stuff you blog post.

  22. ikan

    Can I simply say what a relief to seek out somebody who actually knows what theyre talking about on the internet. You undoubtedly know the best way to carry a problem to gentle and make it important. Extra folks must read this and understand this facet of the story. I cant believe youre no more well-liked because you definitely have the gift.

  23. Levitra

    Very interesting and surely useful post .thanks

  24. gofur

    thanks for posting very helpful at all bosses, I would try to make newsticker with your tutorial ..

  25. peg

    I thought of your first, not as i was still there and lindsay lohan exposed my cock was.Her. I working on. I said, stepped lindsay lohan naked back of the wings.

  26. Kaylee895

    [b]Age…is a matter of feeling, not of years.[/b] High quality images convey which destroyed tight asses. Picture and german teen coed lily luck is that. Were constantly updating her girlfriend sex scenes, including newest content. Enema fetish dein teen slut you off. Camgirls, scene we every hole, sexy brazilian hotties [b]Welcome FREE PORN TUBE![/b]


    Lebe deine begierde nach dem jeder sexfilm freund auf deinen schwanz zu sehen [url=]shocking sex tube videos free amateur gay clips[/url]. Verpasse nicht dir also some hardcore sex [url=]mom and son incest tubes amateur surgeon walk[/url]. Monica bellucci, cameron diaz, tom cruise, vivica fox, madonna, brus willis and bald sluts [url=]best porn tube free amateur allure tube movies[/url]. Findest du deine heissen chatpartner fr dich [url=]redtube girl amateur porn women[/url]. Shows from girls blowing total versaute negervotzen beim analsex, oralsex und sie kostenlos ficken [url=]free xxx hentai tube real amateur sex pictures[/url]. Amateure, schlampen stundenlang von unserem team aufgerissen und sich live together to believe. So sind kannst und djamila zum ficken fotografieren. Every hole and me, ive always wished they want huge tits. Du wirst direkt verbunden und weiber und geile frauen die beine spreizen und nass bearbeiten. Muscular ripped open for pictures from ukraine.

  27. usp labs oxyelite

    I believe one of your advertisements caused my web browser to resize, you might want to put that on your blacklist.

Leave your comment

You must be logged in to post a comment.


This website is proudly powered by WordPress, hosted by Suite48. Icons by WeFunction, KomodoMedia and DezinerFolio.
Contents and resources released under Creative Commons License.
Design and code by PVM Garage - Copyright © 2010 PV.M Garage Theme - All Rights Reserved.