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)

2
votes
3answers
799 views

How to mass-insert categories?

I want to insert hundreds of categories, structured hierarchically. Any suggestions on how I could do it in a batch mode? Thanks.
0
votes
2answers
1k views

How we add new categories by wp_insert_post

I am using fornt end form submission now i want to add new category and before adding this category i want to check whether it exist or not, if yes then simple add to that category otherwise add new ...
1
vote
0answers
18 views

Yearly Archive for Categories with dropdown

this is my first post, I already read a lot of threads and tried a few ways but none of them worked. I have a website with two pages, which show the posts of a categorie "news" and the other one shows ...
5
votes
3answers
26k views

How to show all posts of the category in wordpress?

I have create a category by using Custom Post Type plugin, and now only the 5 most recent posts of the category are showing. What I want is to show all posts for the category. For examle, suppose I ...
0
votes
0answers
27 views

Adding a parent category, and re-assigning existing products to that parent category

I'm using Woocommerce. I have around 500 existing products, assigned to categories such as "t-shirt" "socks" "shoes". I want to put all of these under a parent category named "clothing", but the ...
0
votes
2answers
87 views

How order posts from category by date and comment count?

Just like in topic I try to order posts from category by date and comment_count but code below doesn't work: <?php //get post from current category $category = get_the_category(); $...
0
votes
0answers
90 views

How to get parent categories name and post thumbnail image

How can i get current category parent categories name and each parents categories one post thumbnail images. Example, Portoflio Website App Graphics Business Card Flyer Poster so i want ...
0
votes
0answers
15 views

Category page ordered by custom fields with IF conditions

on my site I need to sort posts by a custom field when shown in category pages like this one, but my problem is that I kinda need to do it like this: -if post of the "lyrics" type has the field "...
8
votes
5answers
8k views

How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms

I want to export all Wordpress categories (no posts, just categories) from one blog to another. How can I do that ?
0
votes
2answers
42 views

Custom field picture instead of post thumbnail on category page

I'm trying to modify a theme to make it work with my custom fields (I'm using ACF for most of the data I put on pages) for a site with song lyrics on it. The original code was this: $...
0
votes
2answers
2k views

List child categories from parent category on custom taxonomy page

I making some updates to a theme I'm currently working on. I've moved a bunch of categories that have custom post items under them into a parent category that's all within a custom taxonomy. e.g.: ...
1
vote
2answers
2k views

get_posts and multiple categories

I have created a custom query in hopes of showing the top posts from some child categories. The query has a big flaw: some posts belong to two categories; but, even if they get marked in BOTH ...
0
votes
1answer
44 views

How To Display Category list from Portfolio post type plugin?

I'm new from WordPress development. I want to display portfolio category list in my theme, I'm useing portfolio post type plugin what must I do ? what code or WordPress function must implement in ...
-3
votes
1answer
46 views

hide particular category post from front page only [closed]

i have setup a new wordpress blog and have few categories one is called news and it updates too frequently and less important so I want news category posts to be excluded from my home page only and if ...
3
votes
0answers
92 views

Action hooks returning old category instead of new category

With some help I created a WP Action to send an email to the author of a post (custom post type) when the category has been changed. This works ok, except that the function is returning the previous ...
-1
votes
1answer
26 views

All post of child category not in top category

i have data category: - About us -- Sub 1 about us -- Sub 2 about us In Categor About us a has add post : About us 1, About us 2, About us 3.... In Sub category Sub 1 about us i has add list post: ...
0
votes
2answers
6k views

How to: 301 Redirect /category/ to /customname/

I've changed our "category base" in WP settings from the default "category" to "customname". Now there are 404 errors to links containing the old category slug eg. mysite.com/category/names What do ...
-1
votes
1answer
89 views

woocommerce related products by specific categories [closed]

I am looking for a way to alter the related products functionality to relate one category of products with another. For example: I have 4 categories: Spoons, Cups, Bowls, Straws. When you select a ...
1
vote
0answers
13 views

Prevent additional top level categories but allow more children

Is it possible to prevent additional parent categories being added to posts but allow children categories to be added to predefined parent categories? For e.g.; Food & Drink -- Mexican -- ...
1
vote
1answer
2k views

Sticky post for each category on category pages [duplicate]

I would like to show category.php a post I set as sticky post for that category. Do you know code to do this?
1
vote
1answer
28 views

Removing category base form links messes up the parent-child behavior

I am using the 'standard' trick for category removal in wordpress. In my permalinks I set the permalinks structure to /%category%/%postname%/ And my category base to . Which worked fine, until ...
0
votes
1answer
70 views

Create category post shortcode

I'm trying to create a shortcode for my theme without using plugins. I tried this http://wpgeneratetool.com/short-code/ but i can not figure out how to create. I want to create something like the ...
0
votes
0answers
15 views

Category and tags of CPT customize URL

Actually I have created categories and tags of my Custom Post Type. My URL of category or tags are : www.example.com/category/name-category www.example.com/tags/name-tags but I want to customize ...
0
votes
1answer
50 views

How to auto update post title and slug with category name when post status is updated

I need to auto update post title and slug with category name every time when post status is updated. Some function like this but with the correct code.... add_filter('wp_insert_post_data','...
0
votes
0answers
32 views

How Can i order posts in category pages ? They are not in correct date order

Is there anyone who can help about changing category pages order. Somehow they are not in correct date order ? URL : http://abbakimevi.com/category/bizden-haberler tempalte-blog.php : <?php /* ...
0
votes
4answers
2k views

get_posts with multiple categories

If I do a get_posts() with category set to 1,2 I will get all posts in category 1 OR 2. If i want all posts whit both categories, that is 1 AND 2, how do I make that request?
0
votes
2answers
34 views

How Can Hide Define Category in Post Contents?

This is My Category List : 1- Years 2- Genere And I use This Code For show in posts : <?php the_category(' , ') ?> How Can Hide "Year or Genere" in up code? Please Help Me.i want Show Only ...
0
votes
0answers
24 views

Order categories input fields

I am using: add_action('category_add_form_fields', array ($this, 'add__form_fields'), 10, 2); To add an extra field in the categories form, it is possible to choose the position of this new field? ...
0
votes
1answer
27 views

List Authors For Current Category

I want to list all unique authors that have posts in the current category. My code (location: wp-content/themes/custom-theme/category.php) <div class="container"> <div class="row"> ...
3
votes
1answer
129 views

Display all posts with same title

I'm trying to display in a sidebar php widget, all posts with same post_title in a specific category. I find this code on internet but don't how to use it Thanks for your help. function ...
1
vote
1answer
22 views

Use post as category

I created two kind of custom post type: "Fields" and "Functions". Can I associate a post field with some function post (like if function was a category). I choose to use "Functions" as post, cause in ...
0
votes
0answers
69 views

SQL Query for all posts in specific category

I try to add a custom field to all posts in specific category with a sql query. This query set meta_value of new meta_key as post_author value in ldn_posts table. Here is begin of the code (works for ...
0
votes
2answers
25 views

How to add style in functions.php depending on conditions?

I'm a newbie for coding, I would like to learn how to add css style conditionally in functions.php My header controlled by .header-outer class. What would it be the best way to add css depending on ...
0
votes
1answer
1k views

Category menu that filters out empty categories

I'm trying to build a menu which can be administered from the menu editor, but gets filtered before being output. More specifically the menu contains Woocommerce product categories, organised into a ...
0
votes
0answers
18 views

How can I manually set an order for specific category in Woocommerce?

I have a shop page in Woocommerce where I manually put the order number through the product page. This is fine when they view the entire collection. What I want to do is set a second order number for ...
0
votes
1answer
169 views

Add inline style to get_the_category_list

I need to style the get_the_category_list() a tag but can't seem to find a way. This is my code: echo '<ul class="list-inline meta-list">'; // Get the categories $terms = get_the_terms(...
0
votes
0answers
38 views

Query/load only WooCommerce shop categories into a custom landing page?

I want to reuse the WooCommerce shop-categories in a custom grid landing page, but without the product images, as I am using custom images to make the grid wall. What is the best way to do this? ...
0
votes
0answers
33 views

Article posted in multiple categories but show wrong title

I have an article which is posted in multiple categories and I put those categories in a menu, but when I call the category, the title always shows the first category (ascending alphabetical order). ...
0
votes
2answers
42 views

Change post title if post has specific category

Basically what I am trying to achieve is to have title changed of posts which are in category number 30. My code is: function adddd($title) { if(has_category('30',$post->ID)){ $title = 'Prefix '....
0
votes
1answer
67 views

Assign different category colours to different categories in the main menu

I have created a colour picker field with ACF which shows on every category page and allows the end user to assign a colour to each category. This is working well but I would like the categories on my ...
0
votes
0answers
20 views

Display tags belongs to a category even if if it belongs to multiple categories

Here is my case: I have 2 main categories I would like to display posts in separately: 1) Garden 2) Recipes One page for Garden with posts belong to "Garden" and one page for Recipes with posts ...
1
vote
1answer
84 views

How do I get the category URL from get_the_category?

My loop below shows the latest 4 posts from the same category as the post currently being viewed. Its located within single.php. I'm trying to get the URL of that same category so I can link back to ...
0
votes
1answer
39 views

Single.php category entries not showing right colours

I am trying to implement a way of having different colours for different categories in single.php. So, I have created a colour Picker field with Advanced Custom Fields and this field shows on each ...
1
vote
1answer
6 views

How to add Wordpress sub category without select

How do I add a wordpress sub category without select parent dropdown using text Thanks.
1
vote
1answer
43 views

Need help with category listing!

I'm trying to solve this for a while, but I couldn't get a satisfactory way to get what I want. Maybe it's very simple and I'm just too inexperienced. I need a way to display all the article titles ...
1
vote
1answer
121 views

How to tax query X number of posts related by tag first, then by category if not enough in tag-related

Question How to output tag related posts first, then IF there are less than 4 tag related posts, fill the rest of the 4 spots with category related posts? Scenario Sometimes a post has very few ...
0
votes
0answers
33 views

Loop through custom post type taxonomies

I have created custom post type products and I want to show categories on products archive. I have this code <div class="container"> <div class="boxes"> <?php $cat_args = array( '...
2
votes
4answers
1k views

Creating “static” taxonomies to choose from, inside custom post type?

Alright, so i have a custom post type called Blurbs (translated, sort of). I want to add a static set of categories for the posts within Blurbs (i don't want the user to be able to create custom ...
0
votes
1answer
35 views

wp_category_checklist won't show up for non-admin users

I have a product registration page with a form in which I use wp_category_checklist() to make my users select categories. This works great only, I just today noticed that only admin's can use the ...
0
votes
0answers
25 views

Filter WordPress custom post type with taxonomy

I'm new to word press I have create one custom post called product and have three taxonomy in it. 1.product type 2.location 3.category now i want to search product with all taxonomy selected by ...