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)

1
vote
1answer
2k views

Best Way to Redirect Category to Page and Hide Category

I have a category archive page at: http://mysite.com/news It displays an archive of items from the category 'news-article' I'd like to redirect any requests for ...
0
votes
1answer
2k 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
4k views

Display only one level subcategory in wordpress

This code uses taxonomy category image plugin to display images for categories. This code display subcategories of main category in parent category page (category.php), But I want to display only one ...
0
votes
1answer
19 views

how to use two permalinks for one custom post type based on categories

I am trying to get 2 different permalink for one custom post type, based on the solution given there. It is working for articles, but I can't get it work for my "film" custom post type. Here is my ...
1
vote
1answer
49 views

Sorting posts by season

What would be the best way to go about creating something like this (https://www.fiawtcc.com/calendar/) in WordPress? This is a calendar, with posts (containing the event date and event description), ...
0
votes
1answer
20 views

How to relocate images

I need to move all images attached to posts of a specific category (MyCat) from its current standard location (/uploads/year/month/) to a specific category folder (/uploads/mycat/). For instance: ...
1
vote
2answers
225 views

Add line breaks in Category description via enter

My client wants to ad line breaks in category description via keyboard enter. In the editor the white space is added, but it is not shown on the website. I can add it with   but I have to ...
-2
votes
1answer
78 views

query_vars category_name only display one catgory out of multiple categories

I am working on a plugin which alter the query arguments! Plugin uses $wp_query->query_vars['category_name'] to get the category slugs. Everything works when I am fetching posts from one category. ...
0
votes
0answers
31 views

Display category name only once inside loop

I have been researching on how I can output the category name on a wordpress loop for custom post only to display only once. If there are any posts under the same category, the category name will not ...
0
votes
0answers
23 views

Get posts from two taxonomies

I've created post types and taxonomies using Custom Post Type UI plugin. There are two taxonomies: rubric and city. Each taxonomy post lists are available at URLs /rubric/toaster/ and /city/kiev/. I ...
0
votes
1answer
21 views

get parent category only

Thanks to wordpress.org, the snippet below will display a list child categories link only for each respective post if there's a child category for them. <?php foreach((get_the_category()) as ...
0
votes
0answers
30 views

How to display total views of all posts of one category?

Is there any way to display total views of all posts of one category? How to show that number on archive page? I have used this code to count views of each post: function getPostViews($postID){ ...
2
votes
2answers
65 views

Filtering search results

I have pages, posts and woocommerce product categories and products in my website. I want to limit wordpress default search query so that it returns the posts, the pages, the product categories but ...
0
votes
1answer
15 views

Is there a way to combine categories and their hierarchy into the admin listing page?

A simple question for a plugin that I would imagine must exist yet I can't find it. I want the standard listing page of posts (for my custom post type) to show all the posts within a tree like ...
2
votes
1answer
1k views

Display all posts from all categories with pagination

Alright, this might be a tricky one to explain but I'll do my best. At the front page I want to display all the posts from all the categories. However I want them to be divided. Take this for an ...
0
votes
0answers
21 views

Limit results of custom query to current category

I have created a geolocation system for a custom post type of services and have been working on a query to limit the results based on address/distance entered by the user. Everything seems to be ...
0
votes
0answers
23 views

How to display custom content on categories and subcategories pages?

There is a site on wordpress with categories and subcategories. It is necessary that in the pages of the categories and sub-categories display special content, not as usual: a list of recent posts in ...
0
votes
0answers
21 views

How to List subcategories of a single category alphabetically

Imagine there is a category called Info ( id = 40 ) that has many subcategories . Now I want to show the ones that start with " A " and " D " somewhere else . Is there a way to kind of get ...
0
votes
0answers
19 views

Get current category for post with multiple categories (custom taxonomy)

I have created a custom taxonomy for services and a custom post type of service, there are currently 6 categories within services and each post can be assigned to multiple categories. What I would ...
0
votes
0answers
56 views

Custom post type category pages return 404

I have created a custom post type using the following code and its working but i get a 404 error when accessing the category pages. function services_init() { $args = array( 'label' => ...
0
votes
0answers
29 views

Wordpress automatically replace space with underscore when update category name

I've tackle something pretty weird in wordpress. When I try to change category name, wordpress automatically replace space with under score, and also upper case with lower case, as if it was the slug. ...
0
votes
1answer
31 views

Category next page link not working

When I go to a category page and it lists the posts that are in that category, it lists 10 per page. At the bottom of the page it has the link for next page, but that link returns a 404 error. The ...
0
votes
1answer
3k views

How do you remove display of WooCommerce product category on single product page?

On my single product pages, I would like to change the meta data so that the Category button for the product does not display. I can't seem to figure out where this is called. I've looked in various ...
0
votes
0answers
22 views

How do link to the most recent post in a category (Cornerstone theme)?

Hello friends :) I am in a pickle. I am creating a website in X/Cornerstone for an artist who has many projects , each has of which has its own Wordpress site. All of them rely on blog posts to ...
0
votes
0answers
34 views

Change Form Category List to Dropdown

I am using Front-end Post & Media Manager from WP-Eden for my users to allow them to create posts in the frontend. Everything is working fine but not really good. My site have about 100 ...
0
votes
0answers
18 views

get texonomy image from custom post type

Hello I have been using a wordpress theme called cliper it has a cpt called coupon with taxonomy like category and store and I am using a plugin http://zahlan.net/blog/2012/06/categories-images/ to ...
0
votes
1answer
19 views

get_next_post set the category

Is it possible in Wordpress to set the category used in get_next_post? I have post that can have more than one category. On the single.php page showing the post I want to show next and prev posts. ...
0
votes
0answers
16 views

Fetching get_terms data of a custom [empty - no posts assigned] taxonomy its in archive page?

My problem: when I access an archive page of a custom taxonomy's subcat. or subsubcat. and the cat. has no posts assigned to it, WP get_terms() functions returns nothing. When a cat. has > 0 posts ...
0
votes
0answers
25 views

Custom file with special code of category widget

Is any way to define custom code/file of standard class-wp-widget-categories.php for my theme? In standard WP class-wp-widget-categories.php list is printed in simple <ul> tag. I need to add ...
0
votes
0answers
32 views

Subcategory generated based on title of custom post type

This is what I have in my functions to create a category based on the title of a custom post type "attorneys": add_action('save_post', 'add_title_as_category'); function add_title_as_category( ...
0
votes
1answer
26 views

Loop categories by recent post

Im looking for a way to loop through categories and then display the recent posts for each one in a container but I need a way to sort the categories by which ones have the most recent posts So if ...
0
votes
0answers
44 views

Problem with Custom Post type Category Listing Pagination

I am having a really hard time for the past three days getting the pagination in custom post type Category page working. I am using WP-Knowledgebase plugin which uses custom post type. The pagination ...
3
votes
3answers
14k 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
1answer
28 views

How to display the past events in one of the category?

I my project I have the events page where it display all the upcoming events according to the dates. But my client needs to have one more category called "Past events", where all the past events ...
-1
votes
2answers
85 views

Call function on a single page

How can I apply this function to a single page ID: function exclude_jobs_locations($args){ $exclude = "40"; $args["exclude"] = $exclude; return $args; } ...
0
votes
1answer
276 views

Random taxonomy category list

I'm trying to display one of my custom taxonomy lists on a page. I want to show five but have them in different random orders when the page is refreshed. I've tried using shuffle, but it just ...
0
votes
3answers
68 views

Targeting Parent Category Pages

I wish to create different template pages for all Parent Categories and Subcategories. I was hoping to do it using the hierarchy (eg. something like category-parent.php and category-sub.php), but ...
-1
votes
3answers
480 views

How can I implement pagination on custom category page?

I have created a custom template page for every one of my categories. I am using a foreach loop in order to fetch the posts of this specific category in my page. if (is_page()) { ...
1
vote
2answers
2k views

Including categories in search results

I am trying to include categories in search results. I've been searching for hours now with no solution. By "including categories" I don't mean search in a certain category, I mean let's say I have a ...
0
votes
1answer
25 views

create post with main category and other categories from admin panel

I want to add functionality in admin panel for add / edit post with selection like main category and other category. Main category will be used to generate permalink of particular post. Default ...
0
votes
0answers
27 views

Category name not shown correctly

I've a page that lists all lyrics type posts for each category. It all works well, my only problem is that in the foreach category I put an echo to show the album title in the list, but every single ...
0
votes
0answers
32 views

Limiting Wordpress search to category description

I'm working on a project where i need to customize the Wordpress search engine. I want to be able to search the category description in the 'wp_term_taxonomy' table. There are quite some snippets ...
8
votes
1answer
13k views

Get posts from sites in Multisite?

I'm trying to pull multiple sites posts. For example, I can pull out a single site posts by a category and total posts 10. But I'm trying to pull out both posts from two separate Multisite blogs 1 ...
2
votes
1answer
3k 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( ...
0
votes
1answer
290 views

WooCommerce duplicate sub categories and product slugs

I'm building a website that allows you to hire or buy a product. I've set up the following product categories in WooCommerce: Hire Buy Is it possible to have the same sub-category slug under each ...
0
votes
0answers
22 views

Show name of post category, and name of category parrent (if category has parent)

Example: I have category named "Food" and inside that category another category named "Fruit". How to show name of post category, and its parent category (it category has parent category). After ...
2
votes
3answers
761 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
15 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 ...