WordPress实现点击标签云中的某一标签,就展示出此标签下的所有文章

WordPress实现点击标签云中的某一标签,就展示出此标签下的所有文章

WordPress实现点击标签云(Tag Cloud)中的某一标签,就展示出此标签下的所有文章。

代码如下:

<?php
get_header();
?>

<section id=”primary” class=”content-area”>
<main id=”main” class=”site-main”>

<?php
if (have_posts()): ?>

<?php
$tag = get_query_var(‘tag’, ‘淘宝’);
$args = array(
‘tag’ => $tag,
‘showposts’ => 300,
‘caller_get_posts’ => 1
);

后面还有,详情请看原文

http://ant73.com/269.html

猜你喜欢

转载自blog.csdn.net/metababy/article/details/93460414