Question

I have a marquee code with recent post, i want to change with category base.suppose i select featured category.i want to recent 10 featured category post tittle show in this marquee code....

my recent post code show below...

<marquee width="820px" style="font-size: 12pt; height:32px;padding-bottom: 10px;" behavior="scroll" direction="left" bgcolor="#DEE9FB" scrollamount="2" scrolldelay="60" onmouseover="this.stop()" onmouseout="this.start()"><?php $latest = get_posts('numberposts='.$bnews_options["BnEnumber"].'&offset='.$bnews_options["‌​BnPostSkip"].'&cat='.$bnews_options["BnCatID"]); foreach( $latest as $post ): ?
&nbsp;&nbsp;<img src="http://hostshine.net/wp-content/uploads/2013/02/dot.png">&nbsp;&nbsp;</font><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><?php endforeach; ?></marquee>

which code i can change, for do it category base?

Was it helpful?

Solution

you can use this code. but remember i don't support you to use marquee code..

<marquee width="820px" style="font-size: 12pt; height:32px;padding-bottom: 10px;" behavior="scroll" direction="left" bgcolor="#DEE9FB" scrollamount="2" scrolldelay="60" onmouseover="this.stop()" onmouseout="this.start()"><?php query_posts('category_name=wordpress&showposts=5'); ?><?php while (have_posts()) : the_post(); ?><li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li><?php endwhile; ?></marquee>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top