doulao1934 2016-04-29 09:41
浏览 113
已采纳

修改显示哪些Wordpress类别

I'm building a bespoke Wordpress theme for a periodical. I have a category set up that basically marks an article as "featured," making them appear on the homepage. I'd like for this category to not appear when browsing the site, however, as it's meant for the magazine's staff to be able to control what's on the homepage, rather than be used as a tool for user's to search with.

Since the_category(); will return all categories, I need help building a php loop that will display categories while skipping this one. A post will only ever have one category, unless this second one is applied. I also think building a function that could be referenced several times across the site would be the most efficient way of handling this.

If there's an even simpler method to reach the same outcome, feel free to point that out as well. I'd just like to keep my plugin dependencies minimal. Thanks for your assistance!

  • 写回答

2条回答 默认 最新

  • 普通网友 2016-05-01 05:50
    关注

    After doing more research into my options for developing with Wordpress, I've found that using a custom post type will work far better than filing these posts under a category. Apologies for the confusing post.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记