Every Post in WordPress is filed under one or more Categories. Categories allow the classification of your Posts into groups and subgroups, thereby aiding viewers in the navigation and use of your site.

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Wordpress using get_term to retreive slug not working as expected

Im using the below code to try and get the slug for the current category and the parent category. Ive managed to get as far as getting the currently cat slug but the parent displays in readable text ...
0
votes
0answers
17 views

Get page tag and load custom posts with same tag

I've added the tags support for pages using this plugin: http://wordpress.org/extend/plugins/post-tags-and-categories-for-pages/ And I've added tags support for the custom post: function ...
0
votes
0answers
9 views

How to list categories within tags?

I'm currently working on an ecommerce site with WooCommerce. I'm using product categories for product types (e.g. cards, DVD's), and product tags for topics/themes (e.g. Christmas, children). What ...
0
votes
1answer
10 views

Different post styles depending on category

I am using Zephyr theme The link to the blog page. I want to style each post differently based on the post category ex: social media, announcements ect. I would like to style them using a cards ...
0
votes
0answers
13 views

How do I let users specify interests on signup and have this reflect content displayed on homepage?

I'm looking for something that will allow my site to have the following functionality: A user creates a login for my site. When creating a username and password, they also select from a list of ...
-1
votes
0answers
9 views

-woocommerce- Adding multiple parent category to a Sub category? [on hold]

I currently have a client that sells door mats(for example) He is currently using the Woocommerce plugin for Wordpress and having trouble assigning parent and sub-parent category's. He has 2 parent ...
0
votes
0answers
14 views

Retrieving category pages from subcategory returns empty sets

I've a category overview page. It shows its subcategories. These subcategories have subsubcategories which are pages too. I'd like to retrieve those (title, permalink and excerpt) but so far my ...
4
votes
0answers
45 views

Delete a specific category when deleting a user

I'm using the following function to create a portfolio category named "tips_username" when a user registers on my website. add_action('user_register', 'auto_create_traveltip_category'); function ...
1
vote
1answer
19 views

How to get the number of child categories a specific parent category has?

How do we count the number of child categories of a parent category? I am using a custom taxonomy, called: "authors". I found this code, which does count the number of child categories, but only ...
0
votes
0answers
11 views

How to query post from sub-categories on category archive and display posts?

On a custom taxonomy archive from the taxonomy called 'books' (taxonomy-books.php) I want to list all subcategories that are assigned to the parent category. And then for each subcategory I want to ...
1
vote
0answers
15 views

Render Selected Categories in Admin Edit Post Screen differently

Selected Categories for a post in the admin screen are rendered by: // Put checked cats on top $output .= call_user_func_array( array( $walker, 'walk' ), array( $checked_categories, 0, $args ) ); ...
0
votes
1answer
19 views

how to get postmeta info based on multiple categories?

I need to get one meta_value from wp_postmeta and I can do it with one category but I'm having problem when using another one. I have: SELECT wp_posts.ID, wp_postmeta.meta_value FROM wp_postmeta ...
1
vote
0answers
14 views

Reload parent categories list in (new) post

I have a question about parent categories list in a (new) post. I have few categories what I would like to exclude from parent categories list. When I open (new) post page, few categories are ...
-1
votes
0answers
16 views

WordPress category Pagination Not Working After Modify the Loop [duplicate]

I modify the category page loop as following code. Now Pagination not working. Why is that? How to correct it? Note : Even though there many similar questions on this site any of them not solve the ...
0
votes
0answers
14 views

Assigning custom-single.php based on category

The code below looks like exactly what I need but I dont know how to update it to work for 3 custom single.php files plus the default single.php for any other posts not in one of these 3 categories ...
2
votes
0answers
13 views

get / list categories and counts filtered by custom taxonomy term

In my post 'post type' besides "categories" I've a custom taxonomy called "product-types". The category is actually more "manufactures" of the product types. I've a product-types page where I list ...
0
votes
0answers
21 views

Can not be able to insert the custom post taxonomy

here is my code in which i can't get insert the term in custom post type taxonomy .as in the the code in wp_insert_term($term,$taxonomy,$args); cannot work , while it is working if i put a string ...
0
votes
0answers
8 views

When add new custom post then automatically create category same postname [on hold]

i'm using cpt ui plugin .i'm create a Post Types and Taxonomies registered by Custom Post Type UI. in this register post add new then automatically added to category not create manually create ...
0
votes
2answers
35 views

List all categories but exclude current post category on single post page

I want to display a list of categories excluding the category of the current single post that the user is navigating on. The list is displayed on the single.php template. I'm using this code to ...
0
votes
1answer
34 views

Change single.php template based on parent category

I have the following code working but with split() being depreciated and not available in php 7, I need some help. The idea here is this code is inserted in my single.php (in child theme). When a ...
0
votes
1answer
18 views

Why does accessing url by category cause issues with post types?

I just built a site with a few CPTs (apple, banana, cucumber). My boss wanted to split them out into categories (red, yellow, green) and link to the category pages. As soon as we did and accessed the ...
0
votes
1answer
16 views

Is there any way to check which wordpress categories was created by which user?

Showing users only those categories which was created by them only. I tried to find relations between categories and users in database but couldn't find any.
1
vote
1answer
21 views

Custom category code not showing all posts

I have a PHP template I am applying to several pages on my site so that they show a list of all posts in a category with the same name as the page. However, this is not working correctly in that posts ...
0
votes
1answer
37 views

Get Attachment Category Name

How can I call the name of an attachment category? Something that would look like <?php get_attachment_category_name ?> or $attachment->category_name This would simply output the name of ...
0
votes
0answers
32 views

Accessible Subcategory URL's pages without using .php hack

I'm attempting to setup a custom URL structure within posts that makes all parents and sub child's accessible, but all attempts have failed with various errors. My category structure looks something ...
-2
votes
0answers
9 views

Display the sub categories names

Display Categories or Subcategories with name & description in category.php I followed the above link the code working good..but i have sub-categories names in this code
1
vote
1answer
33 views

Could not insert term into the database

I've spent a fair while reading about the "Could not insert term into the database" error, but the fixes I have read (changing theme, fresh WP install, disable plugins) simply are not working. I ...
0
votes
0answers
21 views

Wordpress and “pretty permalink”

I've installed wordpress and set permalink structure to /%category%/%post_id%_%postname% I've also used 'No Category Base' plugin I can list all posts in category 'my-cat' on archive page ...
1
vote
1answer
33 views

Detect whether a page is a product subcategory page?

How can I detect whether current page is a product sub category page? I've tried with the following but it will always print out "NO" function is_subcategory($category = null) { if ...
1
vote
1answer
16 views

How do I edit pre_get_post for the category the user is currently in?

I've got a Woocommerce site that uses categories and products within those categories but how do I get my search form to only display results of products within the category the user currently is in. ...
0
votes
0answers
21 views

How to get post count including nested categories

I am traversing through categories using function like this function hierarchical_term_tree($category = 0) { $r = ''; $args = array( 'parent' => $category, ); $next = ...
0
votes
1answer
47 views

How to show the posts of some category first, and then the rest? Cant figure out the coding

but to be specific, i need to retrieve certain data from the post - and showed one category's post datas first (preference) in the coupon's list and then other categories post data second in the list. ...
-1
votes
1answer
20 views

How to get Woocomerce categories count

Is there a short way to get the number of categories in woocomerce shop homepage and also number of subcategories on category page?
0
votes
0answers
19 views

Multi-tier Categories by post type?

We've been using CPT UI to allow us to create segregated categories for different post types. Unfortunately, this plugin only allows single-tier category view in the admin area. What I'm after is ...
1
vote
1answer
25 views

Remove Parent Category from Child Category URL

I am trying to remove parent category from the child category but each attempt returns a 404 error. Main Category Link (Displays All India Recruitment) Child Category Link (Displays Sub-Category) ...
-1
votes
0answers
20 views

only allow ONE post in a certain category; uncategorize all other posts with same category

I've created a category called "top headline" and relative query that displays ONE POST from this category. Scenario: Let's say I have one post currently categorized as "top headline". Then I create ...
0
votes
0answers
24 views

Customizing a category archive page through plugin

I have created a plugin that adds a custom post type called "Activities". This post type's archive shows all the categories, and then the categories each have a page that includes the posts contained ...
-3
votes
2answers
34 views

How do you get parent and grandparent categories [duplicate]

I'm wondering how you can receive a categories parent name and link for a breadcrumb I've written. I basically want to have the following structure if child category blog > parent_category else ...
-2
votes
1answer
31 views

How to display parent category name and link for custom breadcrumb

I'm currently trying to figure out how to display a categories parent / grand parents name and url for a custom breadcrumb I'm working on. I simply need to know how to show the parent categories ...
0
votes
0answers
11 views

Category specific attribute

I wonder what is the best way to define specific attribute for category. My idea is following. I have some categories that are just wrappers, they don't contain any post so they are only parent ...
0
votes
0answers
17 views

Is there a way I can index all my empty categories in a xml sitemap

Is there a way I can index all my empty (no posts) categories in a google xml sitemap? I've tried all the popular xml plugins but they only index categories if they have a post associated with them. ...
0
votes
1answer
15 views

Category page returns 404 error

I'm developing custom theme that should show all categories on a single page in /category path. When i navigate to /category/some-category, i can see all posts that belong to that category, but when ...
0
votes
0answers
22 views

Hide empty categories from get_categories

I'm trying to hide the empty categories (with no posts associated) from a list in an archive page. I'm using hide_empty as suggested on Wordpress codex but it's not working, the code outputs all ...
1
vote
3answers
60 views

How do I apply style to each category of a list?

I need to create a simple plugin to show a list of categories inside the body of the post and, as I am new to coding, I searched for the basics and started to make little changes; it looks like this, ...
0
votes
1answer
54 views

Custom post type and category link together

I have issue with making new page for this : Category link is : /category/category_name But I want to be : /custom_post_type/category_name Custom post type code $labels = array( ...
0
votes
0answers
24 views

Front end post submit with custom taxonomy and category

On my website i'm buildng a front end post publishing based on this article. All my posts have both category and a custom taxonomy. The problem is that I can't find a way to save both default ...
0
votes
1answer
16 views

Getting the Most Recent Posts from Multiple Categories

I've got a page (page, not post) that near the bottom of the page I want to get the most recent 15 posts from a set of categories. I'm new to doing this and thought I was doing it correctly. The div ...
0
votes
2answers
26 views

Changing the Category for all posts of an Author

I'm trying to change the category for all posts of an author. I've been looking on here for about an hour and haven't found a solution.. Any help would be greatly appreciated :) Thanks, j03
0
votes
0answers
10 views

Category and post_lists

I´m trying to make a template for a wordpress site where i need to fetch posts form two different categories - two times. (ie.two loops) But seems like the category sort is just working for the ...
3
votes
1answer
281 views

Listing a post's categories and subcategories

Is there a way to display the parent categories and subcategories for a particular post (ie. for use on single.php). I've tried using get_the_category_list(), but it displays a list like this: ...