2013-06-13 25 views
1

我有一個選擇框代碼與最近的職位,我想改變與類別base.suppose我選擇特色category.i要最近10特色類別職位在這個選取框代碼顯示tittle顯示。 ...最新消息顯示與類別庫在跑馬燈代碼

我最近的後下的代碼顯示...

<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> 

哪些代碼我可以改變,爲做到這一點類別基地?

+2

請不要使用字幕http://www.w3.org/wiki/HTML/Elements/marquee – 2013-06-13 04:18:12

回答

0

您可以使用此代碼。但請記住我不支持您使用字幕代碼..

<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>