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
1answer
1k views

forming WP_Query for posts of all post types but from specific categories

I need to get post from blog, custom post type 1, custom post type 2. custom post type 3 and either from category 1 or category 2 or category 3 or category 4 or category 5 or category 6 or category 7 ...
0
votes
3answers
5k views

WooCommerce - Display product child categories from specific parent

I want to edit the following piece of code: <?php if ( (!$theretailer_theme_options['category_listing']) || ($theretailer_theme_options['category_listing'] == 0) ) { ?> <!-- Show ...
0
votes
1answer
31 views

Dropdown switching subcategories portfolio

I have portfolio on my site and i want add dropdown switching subcategories for taxanomy 'potfolio-types' For example: Category A subcategory 1 subcategory 2 etc... when're in ...
0
votes
1answer
27 views

Display only subcategories of a category and not sub-subcategories

I have next code and i cant get it to list only the subcategories of a category and not sub-subcategories of the category. I think the problem is the next line 'hierarchical' => 0, Do you ...
0
votes
2answers
836 views

create single.php for specific category by category id

I'm trying to create template for specific category with id 1 for example. The template should be applied to all of the pages belongs to this category. So, it should be something like single-1.php. I ...
1
vote
1answer
49 views

Posts from all the categories are being displayed instead of particular category

Created a custom post type Menu it has Categories and Sub-Categories. I am succeeded in fetching Sub-Categories of the post using this code. <?php $wcatTerms = get_terms('menu-items', ...
2
votes
1answer
45 views

How i can let users add notes to my posts

I want to let users add notes to my blog posts, but I want to keep the notes separated from posts. What I mean is to have something like comments. Is it possible when a user writes a comment that ...
0
votes
2answers
603 views

How to make subcategory for custom post and and display?

I've created a custom post with categories like books, foods, and make some sub-categories like in foods cat, pizza, fastfood. But when I display them in my side bar, it's showing same as sub ...
1
vote
1answer
18 views

Pre-selecting the category for a custom post type

I have a custom post type that has 6 available categories. The categories are used as column headings in a table with their corresponding posts in that column. I want to be able to click on the ...
0
votes
2answers
1k views

Filter categories using tags

I have a website with the following categories: Videos Pictures Stories And I have a lot of tags like: Funny, Awesome, Mind Blowing, Crazy, etc. Is there a way I could filter lets say: Videos ...
0
votes
0answers
24 views

Search form not working as expected

I've made a search form with dropdowns and when I select an option from each one it does not display any results. I've been trying to change the wordrpess search query but with no luck until now. here ...
-1
votes
1answer
41 views

Do not show all post from all categories, just show posts from category in current loop

I have following loop that show all children categories of a parent category(id = 3) The first loop i want to show every child category in a parent div (destination-tours) The second loop i want to ...
1
vote
2answers
1k views

Display posts from Custom Post Type in category page on front-end

I created my Custom Post Type (bizdirectory), created a new post (Test Business) and created a new category (Business Directory). But if I add the Business Directory category (slug = business) to my ...
0
votes
2answers
27 views

How to display wp_list_categories on div instead of li?

Does anyone know how to display the wp_list_categories() on a div instead of the li? I basically want to wrap main categories and its children in a bootstrap column. $args = array( 'taxonomy' ...
11
votes
2answers
5k views

Is There a Difference Between Taxonomies and Categories?

I've been reading the codex for WordPress closely and am confused about the vague definitions between what a Taxonomy is and what a Category is. For that matter, term is also a word that is used in ...
0
votes
2answers
11 views

in_category('category-sluga') returns true for Archive page of Category 'category-slugb'

I've got a Category Archive page with name category-slugb.php. I have a sidebar with some Widget Logic that uses in_category('category-sluga'). What's odd is that on this Category Archive page (i.e. ...
0
votes
2answers
31 views

How to get related category/categories in WordPress archive page

I am using WooCommerce in WordPress. I have few categories of products like these, Example: Product 1 Category (//parent) -- Category 1 -- Category 2 -- Category 3 -- Category 4 Product 2 Category ...
0
votes
1answer
20 views

Hide category name in URL

I have this situation myurl.com/catA leads to main wordpress site, and I need to make that myurl.com/catB should leads to specify wordpress category but without showing it in url like ...
0
votes
0answers
15 views

Wordpress: Trying to echo taxonomy slugs of individual downloads, but limit them to the $atts[category] selected from shortcode from post

Note: I'm a reasonable newcomer to .PHP, starting with this project. I understand the concept of it, but I'm not yet skilled enough to figure out what functions I need to use for something a bit ...
0
votes
0answers
16 views

How to sort search results with a specific category first

I'm using the Zoner theme for Wordpress and would like properties categorized as "featured" to be first on the search/archive page. Is there a way to run the search query twice, such that the first ...
1
vote
1answer
598 views

Trying to sort and display categories(not posts) by custom field: 'order'

I'm a WordPress rookie. I've added a custom field to my "Category" taxonomy. The custom field is "custom_order" and its purpose is to hold a number so that my categories can be sorted and displayed in ...
0
votes
2answers
51 views

Show parent-child relationship for categories in the wordpress admin

How can I show child categories under there parent category in the wordpress admin? On a post the format of the category box would look like this: Category 1 Sub-Category 1.1 Sub-Category 1.2 ...
0
votes
1answer
16 views

problem with category menu, it doesn't want to show link

I have created a category menu but when it displays in front page it shows just text without link. thats my code: $menuname1 = $lblg_themename1 . 'categorie Menu'; $bpmenulocation1 = 'secondary'; // ...
1
vote
2answers
66 views

View the latest created categories

I am creating a section on my site that will display the last five categories created. How could I do that? UPDATE: The code below is what I want, just like to know how to apply in order, if the ...
0
votes
1answer
25 views

Front end post submissions do not get submitted in the category

If I submit the post after choosing a category the post doesnt get submitted and instead it takes me to the category page i have selected.However if i delete the fieldset "category" and fill the form ...
0
votes
3answers
1k views

Get id of category from drop down menu

Im trying to get the category ID from wp_dropdown_categories();and then pass the ID into a loop to have it output posts titles from that particular category. I currently have this: <form ...
1
vote
0answers
13 views

Convert non-hierarchical taxonomy to hierarchical after registration

I have a custom taxonomy that was created by WooCommerce (product_tag). I'd like the taxonomy to be hierarchical so it behaves like categories instead of tags. I need to do it after the taxonomy ...
3
votes
4answers
5k views

Get the first post term

How do I get only the first term of a custom post type. I can get all - no problem. This what I am using to grab all of them <?php foreach ($terms as $term) {echo '<a ...
1
vote
0answers
22 views

How to password protect a category page / not posts?

I have seen this question here but the answer was a plugin ( cat-pass ) that would password protect all the posts under the category. I am looking to password protect the category itself and not ...
17
votes
4answers
8k views

Adding categories to custom post type in permalink

I know people have asked this before and have gone as far as adding the custom post type, and rewrite for permalink. The problem is I have 340 existing categories which I would like to continue ...
3
votes
2answers
9k views

How to change permalink structure for custom post type and it's taxonomies?

This is a repost of an earlier question I had, but I like to go into more details now to be able to fully solve this. So again, with (normal) posts changing the permalink is as easy as going to ...
0
votes
0answers
20 views

Edit child UL's in Walker_Category

I'm using wp_list_categories to display my categories. The children of a Category get wrapped in a UL with only a class of "children" but I want to add an ID attribute to that UL. Here's how it ...
0
votes
1answer
362 views

How to use an array of categories as a dropdown?

I need to use an array of existing categories as a dropdown option value then use the selected category ID. More exactly, I try to make a custom module to display the latest posts form selected ...
0
votes
0answers
13 views

custom field suite : relationship filter by category

i'm working on a wordpress site where the Custom field suite plugin is already installed : http://customfieldsuite.com/ The plugin allow the admin to create a relationship field : ...
0
votes
2answers
21 views

Where and when does WordPress invoke routes

One of my URLs for which I'm wanting to create a Category Archive is coming up with a 404 despite having matching routes and, supposedly, matching templates. I'm going through the core WordPress code ...
0
votes
0answers
15 views

Debugging - is_category()

I'm trying to work out where WordPress decides if a URL is pointing to a Category or not. I've got to this function in query.php public function is_category( $category = '' ) { if ( ...
0
votes
0answers
22 views

query.php - multiple is_category functions

Why does query.php have multiple is_category functions?! E.g. in my version of WordPress (4.x) I have in query.php: line 230: function is_category( $category = '' ) { line 4095: public function ...
0
votes
0answers
27 views

Category archives

According to the WordPress docs, to show a Category archive you simply need to create a file with the right file name i.e. category-slug.php category-ID.php category.php archive.php However what ...
0
votes
1answer
12 views

New Category - custom taxonomy

When you click on Posts > Category and Add a new Category - is this new Category an example of a custom taxonomy? I had a read of https://codex.wordpress.org/Taxonomies but still didn't make much ...
2
votes
1answer
2k views

Display products for a category, sorted by post_excerpt

I'd like to display a list of products for a certain category, sorted by the post_excerpt. The original code I used was this: $args = array( 'tax_query' => array( array( ...
1
vote
1answer
505 views

Creating gallery with taxonomy images plugin?

My code uses a taxonomy category image plugin to display images for categories. It also displays subcategories of the main category in the parent category page (category.php). I want to display only ...
0
votes
0answers
6 views

Posts assigned to one category disappear from the main feed

I have a fairly new blog site, www.MagneticPatriot.com. (New means it only has a few dozen posts.) There is a particular category I have on this site, "Web Development," that whenever I assign that ...
-1
votes
1answer
111 views

Remove word “Category” from WooCommerce product page [closed]

I'm trying to remove the word Category from the product page. As far as I know the code that displays that is woocommerce_template_single_meta located into content-single-product.php file: ...
0
votes
0answers
14 views

Linking categories and assigning posts in bulk

I am looking for a way to link categories in such a way, that e.g. if you assign few posts to a category, they will automatically be assigned to another category which is linked to the first one. Here ...
0
votes
0answers
24 views

Manage taxonomy for categories of users just like the native wordpress taxonomy for categories of post

i should realize a post-categories like component for users, exactly I would like to get every functionality that wordpress dispose for hierarchical taxonomies. Focus up about: Admin Case admin ...
0
votes
0answers
24 views

Get Meta Value of a parent category

I have a little problem that I cant get my head around to deal with. I use ACF for custom fields and I have specific fields for categories. On each category I assign a color to a custom meta field ...
0
votes
2answers
850 views

Categories widget show empty?

Is there a way I can display all categories in the categories widget that comes with wordpress. I do not want to have to edit the core files and I want to stay away from rewriting the widget, but if ...
0
votes
0answers
13 views

Sync Post Categories with Pages while maintaining ancestors

I'm attempting to automatically create post categories and maintain the post category hierarchy so that it mirrors pages that have been created while maintaining the page hierarchy. I have achieved ...
-1
votes
2answers
54 views

Only show sub-category

I have a news system with a thumbnail and a box on it that show the category related to the news, using <?php the_category(', '); ?> This worked fine using only one category for each news, but ...
0
votes
1answer
24 views

Category For Pages In WordPress

I need to categorize search result of WordPress, I have done that through adding categories to posts and custom post types. Now, only pages are listing without any category, I think it is possible to ...