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)

-3
votes
2answers
44 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 ...
1
vote
1answer
6k views

How to create new category for custom post type?

I have create a custom post type named "jobs", and I want to create a set of category for that, ie like "PHP Jobs", "Python Jobs" etc. $args = array( 'labels' => $labels, 'public' => ...
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
1answer
17 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
3answers
983 views

Display posts in three columns by category

I've seen posts which probably answer this, but unfortunately the answers are all a bit technical without telling you where the code should go? At the moment I have my posts directed to a blog page. I ...
0
votes
0answers
39 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
62 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, ...
1
vote
1answer
687 views

Display category-specific comments in sidebar

I'm trying to display comments in the sidebar from only the current category. So far I've got this: <?php // Posts per page setting $ppp = 8; //get_option('posts_per_page'); // either use ...
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( ...
-1
votes
3answers
478 views

Moving Categories submenu to Media, but still opens Posts menu

I'm developing a very media-centered site with WordPress and am using the default categories and tags on uploaded media using, in part this plugin Media Categories. I am displaying a sub-menu item ...
0
votes
0answers
35 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 ...
3
votes
1answer
293 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: ...
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
27 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 ...
1
vote
0answers
30 views

Get attachments for posts that belongs to a specific category

I am trying to get images which are used by a post belonging to the specific category. For example if I have plants, mushrooms and animals as post categories, I only need to retrieve images that are ...
1
vote
1answer
3k 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 http://mysite.com/category/news-...
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
53 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
239 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 &nbsp; but I have to ...
-2
votes
1answer
93 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
48 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
24 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
26 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
35 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
74 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
17 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 ...
0
votes
0answers
22 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
26 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
28 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
21 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
65 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
31 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
35 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
24 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
35 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
19 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
24 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
19 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
29 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
34 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
32 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
51 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 ...
4
votes
3answers
15k 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
88 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; } add_filter("...
0
votes
1answer
296 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 ...