2013-08-17 31 views
0

我使用這個插件http://wordpress.org/plugins/display-posts-shortcode/顯示頁面中的帖子列表。插件:顯示帖子簡碼 - 如何刪除強標籤?

[display-posts id="48, 46" include_excerpt="true"] 

它輸出

<ul class="display-posts-listing"> 
    <li class="listing-item"> 
     <strong><a href="" class="title">title</a><span class="excerpt">text<br><br><a href="" class="more-link">Read More</a></span></strong> 
    </li> 
    <li class="listing-item"> 
     <strong><a href="" class="title">title</a><span class="excerpt">text<br><br><a href="" class="more-link">Read More</a></span></strong> 
    </li> 
</ul> 

我不明白爲什麼它增加了強大的標籤。我怎樣才能刪除它。當我回顯be_display_posts_shortcode函數的輸出值時,強標記不存在。

回答

0

試試這個代碼...

$(document).ready(function() { 
    $('ul.display-posts-listing li a').unwrap('<strong></strong>'); 
}); 
+0

不想使用jQuery了點。需要知道它是如何插入的。 – user2632980