【问题标题】:Active menu state in wordpresswordpress 中的活动菜单状态
【发布时间】:2010-10-10 21:39:07
【问题描述】:

我有两个博客页面:另一个获取一个类别的所有帖子,另一个获取所有其他类别的所有帖子。而且我使用的是 3.0 中引入的新菜单系统。

现在的问题是,当用户打开时让我们说在 category2 单个帖子页面上,但仍在菜单中 category1 具有活动状态类。

在这两个类别中,单个帖子使用相同的模板(默认模板)。

【问题讨论】:

    标签: wordpress navigation blogs


    【解决方案1】:

    这很简单,here 上有一篇不错的帖子,请将其放入主题中的 function.php 文件中。

    <?php function insertAds($content) { $content = $content.'<hr /><a href="http://www.wprecipes.com">Have you visited WpRecipes today?</a><hr />'; return $content; } add_filter('the_excerpt_rss', 'insertAds'); add_filter('the_content_rss', 'insertAds'); ?>
    

    【讨论】:

      猜你喜欢
      • 2017-12-20
      • 2012-05-11
      • 1970-01-01
      • 1970-01-01
      • 2016-05-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-07
      相关资源
      最近更新 更多