Comments on: How to Display Posts on a Category Page, Divided Into Their Respective Subcategories https://wpshout.com/how-to-display-posts-on-a-category-page-divided-into-their-respective-subcategories/ A hub for advanced WordPress users, developers & savvy business owners. Wed, 13 Apr 2022 14:59:00 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: David Hayes https://wpshout.com/how-to-display-posts-on-a-category-page-divided-into-their-respective-subcategories/#comment-22055 Wed, 13 Apr 2022 14:59:00 +0000 https://wpshout.com/?p=21770#comment-22055 In reply to Kim Koon.

Thanks for pointing that out. The issue is actually caused by the missing $ in front of $main_cat_id. I’ve fixed it above ?

]]>
By: Kim Koon https://wpshout.com/how-to-display-posts-on-a-category-page-divided-into-their-respective-subcategories/#comment-22054 Wed, 04 Aug 2021 05:28:02 +0000 https://wpshout.com/?p=21770#comment-22054 In Step 1: (Function.php)

main_cat_id = get_category_by_slug( ‘main-cat’ )->term_id;

Parse error: syntax error, unexpected ‘=’

]]>
By: Lea Cohen https://wpshout.com/how-to-display-posts-on-a-category-page-divided-into-their-respective-subcategories/#comment-22053 Thu, 27 May 2021 05:53:09 +0000 https://wpshout.com/?p=21770#comment-22053 In reply to Hannan Uddin.

Hi

Sure, I’ll try to help, but forst I have to understand where the problem is.
Have you copied the code that is written in that section, and pasted it in the category-main-cat.php file that we created in section 3? What happened then?

]]>
By: Hannan Uddin https://wpshout.com/how-to-display-posts-on-a-category-page-divided-into-their-respective-subcategories/#comment-22052 Wed, 19 May 2021 12:04:47 +0000 https://wpshout.com/?p=21770#comment-22052 Hi
Hope you are well.
I need help with this “5. Display the Post List Under Its Respective Subcategory”
I don’t have much knowledge about advanced php

Please Help me

]]>