문제

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?

도움이 되었습니까?

해결책

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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top