on line 59, parent
is expected to be an integer, you’re passing an object:
$args = array(
'orderby' => 'slug',
'order' => 'ASC',
'parent' => $category // <---- here
);
it should be $category->term_id
Related Posts:
- Could not insert term into the database
- Activate Gutenberg in category-descriptions
- How can I get category ID by category name?
- How would I increase the Author Role to be able to add a new category?
- How to remove the parentheses from the category widget
- Randomise results from a category page?
- Adding Custom User Profile data based upon Categories
- Only show category to certain user levels without plugin
- How to: 301 Redirect /category/ to /customname/
- Custom Query to search through categories
- Order posts by category name
- How can I make wp_list_categories output li with category-slug as class, for its children?
- Get sticky post from category?
- Display one latest post from multiple categories
- Remove word “Category” from WooCommerce product page [closed]
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- Output link to category from WP_Query loop of woocommerce products
- How Do I Merge Categories With phpMyAdmin
- Display name of the last child category
- Edit the markup of categories list
- Show category children, one level
- If in category to be inside of a function
- How to exclude posts from a category when using this particular format
- Viewing category pages without the word ‘category’ in URL
- Different excerpt styles per category, but chronological
- Show only one category
- Pagination Not Working on Category.php page
- How to view WordPress’ default category IDs?
- Random taxonomy category list
- Broken category pagination
- Color different for the current category
- how to change template?
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Show all posts for a specific category/author
- Hard coded main navigation
- Resort get_categories
- one category template for multiple categories
- Display posts separated by Category in Author’s page
- How can I define a custom archive for childs of a specific category?
- Category shows only top level child categories
- The arrangement of categories always change while posting article
- REST API: Display Category names in JSON?
- List posts in alphabetical order
- Where is the category of a post stored?
- Categories list loop – add separator every 3 categories [closed]
- Add image to each podcast series (or category) in headless WordPress instance [closed]
- wp_list_pages() exclude category
- Limit categories and it’s subcategories for specific group of users
- How to define multi categories posts number
- Get the ID of 10 Latest Pages stored in a WordPress Category
- Admin: Navigation Menus do not show empty categories/taxonomies in the list’s search tab
- getting post data in functions.php
- Category specific order
- how to separate categories in loop.php?
- How can i remove the posts category class names from body_class
- Different Category Headers using in_category and elseif
- Remove the number of posts displayed in wp_list_categories()
- related articles using shortcodes
- Insert HTML content in WP Query at specific point
- “Virtual category page” based on a custom field filter
- How to Sync Menu, Widgets and other masters from Main Website to its Sub Site
- Show category meta in loop on homepage
- How to get selected taxonomy or category ID if using custom walker?
- How to hide widget from certain category
- Category link redirect to custom template page instead of index.php?
- Rebuilding a Site: How to Show Several Category Posts in Woo Framework Theme?
- Get categories related to particular category
- Get post content intro text on category.php?
- Conditional category query breaking?
- Different header for each category
- Unable to browser posts in categories
- 3.1 post formats and specific categories/custom taxonomies
- sidebar troubles, taxonomy trouble
- Code for Category, Tags, Archive URLs
- Duplicate new categories across multisite network
- Display all subcategories from parent category
- Inline If statement to echo CSS [closed]
- Template category.php with page (no posts)
- How to show WooCommerce Categories on ‘shop’ page instead of products?
- How to create Child Category page from scratch at wordpress?
- How to insert category to post via php?
- How to set featured image as background for a specific category?
- Show Subcategory Name Instead of Parent Category
- Get category id of next / prev post inside the_post_navigation
- Limit Category/Tag Dropdown To blog_id in Multisite Install With Global Categories/Tags
- Adding relevant categories to related post
- Code to display category-specific single.php is overriding normal single.php, too
- How can I add a Categories page link to a menu? [closed]
- Media Library filter returns undefined function get_current_screen
- Custom built theme won’t filter categories
- Way to show content of a post, but if exceeds character limit revert to excerpt?
- get IDs from links categories
- get posts from 2 categories. (2 posts)
- Display all subcategories for a product category in woocommerce
- Narrow Down a Shop Page Results Based on a Product Tag in WooCommerce
- Why does my WordPress index has a category?
- Function to reference post meta in place of category Woocommerce
- hide_empty property not working when using get_terms
- Category Redirection Problem
- Hierarchical outline of posts