drt5813 2016-12-08 10:00
浏览 30

Wordpress:显示子类别的帖子

I searched a lot for this but couldn't find a working solution for my exact problem.

What I am looking for is:

On category parent page:

Child category title I

Display X posts of subcategory

Child category title II

Display X posts of subcategory

Posts with no subcategory selected, but do have the parent

Display all other posts of parent category

etc..

And then for

On category child page:

Display all posts

I am looking for a solution I can write within the loop like this:

<?php the_title(); ?>

etc. (I hope everyone understands what I mean).

I am really thankful if some one helps me out, it's even better if it's with a little bit explanation of the result!

  • 写回答

1条回答 默认 最新

  • dongyongmin5711 2016-12-08 10:46
    关注

    Firstly see the screenshot: See and create subcatagory

    Then,

    Follow the code here: Show wordpress subcategories only

    评论

报告相同问题?

悬赏问题

  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)