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
3 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 ...
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
1answer
797 views

Listing Specific Categories from Current Post with Depth

I've been on this for sometime and been having a ton of issues to find a proper way to do what I'm trying to achieve. An Example would be as follows: I have a featured Image with a rollover and I ...
0
votes
0answers
10 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
10 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
962 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
16 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 ...
0
votes
1answer
678 views

Display selected category on post page

Lets assume that we have a post which belongs to 2 or more categories and we wish to display, on the post page, the selected category through which we reached to the post page. What is the best ...
0
votes
1answer
616 views

How Do I Merge Categories With phpMyAdmin

I tried the following phpMyAdmin query to merge my category 112747 into my category 112748: UPDATE wp_term_relationships SET term_taxonomy_id = 112747 WHERE term_taxonomy_id = 112748; It did not ...
-1
votes
0answers
17 views

product_categories shortcode order [on hold]

For a specific page I want to display product categories in the order I specify in the shortcode. I am not sure what to set in orderby [product_categories orderby"custom" number="16" columns="4" ...
-3
votes
0answers
29 views

About the category description [on hold]

How to remove the category name in the description of the category. How to make that the description of the category was displayed only on the first page of the category, and on the next and other ...
0
votes
0answers
15 views

Display product subcategory name on product category page (Woocommerce)

I have subcategory product. I want to display the subcategory's name on my category page. I am using this code: <?php $woosubargs = array( 'hierarchical' => 1, 'show_option_none' ...
1
vote
3answers
45 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
3answers
889 views

Category link redirect to custom template page instead of index.php?

I want to make template page for my custom taxonomy. I have custom taxonomy categories listed as navigation links. It's the country list (China, Slovenia, Serbia...). Every of this categories has ...
0
votes
1answer
667 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
2answers
533 views

Anchor tag generates blank href attribute using echo esc_url( )

Following is my categories page. It's listing the all categories in the page. But when <a href> gets blank value here. see the attached screen shot. Why href is blank here li><a ...
0
votes
1answer
53 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
469 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
18 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
2k views

How to insert category and subcategory using 'wp_insert_post' function?

How would be the array, to insert a post category and subcategory? Thanks.
0
votes
1answer
393 views

How to sort category by custom field value

I am using the following : $catargs = array( 'meta_key'=> 'category_custom_order', 'orderby' => 'meta_value_num', 'order'=> 'ASC', ); but I can get the ...
1
vote
1answer
244 views
+50

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
3answers
3k views

Hide post meta data on a specific category

I'm using the Canvas theme from Woothemes, and their framework (obviously.) I built a child theme and have my custom CSS segregated in a custom.css file in that directory. I've made some changes to ...
0
votes
2answers
24 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
2answers
635 views

Get unique post in parent category

I have a parent category and several child categories. I also have several posts that belong to the child categories. Each post can be belong to several categories. I want to know how to query the ...
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
votes
1answer
26 views

Using a filter in functions.php to add content to single posts regardless if post is in main or child category

Im using following filter (codex) to add some html content with a lower priority (20) to the bottom of my single posts wich are in a specified category: add_filter( 'the_content', ...
1
vote
0answers
19 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 ...
0
votes
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
520 views

Taxonomy Category category.php not working

I have created custom post type, taxonomy and categorys. When viewing the category it seems to be using index.php and ignoring the WordPress template hierarchy. Any ideas why category.php, ...
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
2answers
1k 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 ...
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
48 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
18 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: ...
0
votes
3answers
2k 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
2answers
211 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
64 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
23 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
5answers
801 views

Exclude subcategories from the url

We have a site with categories and subcategories. If anybody navigates to a content belongs to a subcategory the url will have the following form: domain/main-category/sub-category/mycontent/ But we ...
0
votes
0answers
21 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
2answers
2k 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
1answer
677 views

query_vars in plugin when using custom permalinks

I am trying to do the following I need to get the category of the current page at the plugin level so before it goes to archive.php orsingle.php so i have a plugin to do this and based upon ...
2
votes
1answer
618 views

How to put enctype=“multipart/form-data” in categories form?

I had success putting the code below to include enctype (for images) in custom post type forms, but I'm not able to use it in categories form... is this possible? Thanks. add_action( ...
0
votes
1answer
19 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
1answer
20 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
58 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 ...