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
4answers
2k 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 ...
0
votes
0answers
8 views

Exclude category that matches custom taxonomy slug

I'm attempting to create a separate list of categories, one list showing "key categories" that is assigned through a custom taxonomy. Then another list showing all categories related to the post ...
3
votes
2answers
28 views

Thrash bin for categories

Today I accidently happend to delete my category right after I've noticed there is no trash in categories. I wonder is there any way to include trash bin for it? I've made a little research over a ...
-1
votes
0answers
6 views

display images related to product image (woocommerce plugin) below description in single product page

I have a wordpress site running the wordpress plugin WooCommerce and also I use image category plugin to manage my images. I am trying to display all the images having same category as that of ...
0
votes
1answer
532 views

Hierarchical permalink structure for posts showing categories and sub-categories

I'm having a lot of trouble finding an aswer to this. This is what happens to my permalink structure currently: When I open the page, filtering all posts for a category, the url is: myblog.com/...
2
votes
1answer
956 views

How to create category index table out of wordpress site or on other website?

I want to create a page on other part on my website (outside wordpress directory) where I can show list of posts from a specific category. I am looking for exact solution provided by @toscho here: ...
0
votes
2answers
132 views

How to display product with two condition, category and brand taxonomy

I made a simple loop to display product base from category and brand (custom taxonomy.) Here piece of my loop: <?php $args = array( 'post_type' => 'product', 'posts_per_page' => ...
3
votes
1answer
98 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 ...
4
votes
2answers
223 views

How to show subcategories in categories else show posts

I have hierarchy like this: Category1 -Subcategory1 -Subcategory2 --Post1 Category2 -Subcategory1 I need to show subcategories name and description when i go to category//// Now i use this code: ...
-1
votes
0answers
16 views

Change category link. Lead it to a specific page

How can I change a link of any shop category in functions.php? I have 4 shop categories. To one of them I need change its href-link, it should go to specific shop page. How can I approach this?
3
votes
1answer
416 views

Rewrite rule page url with category

I have enabled the category box for pages with this: // Add to the admin_init hook of your theme functions.php file add_action( 'admin_init', 'page_categories' ); function page_categories() { // ...
2
votes
1answer
655 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
416 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 ...
1
vote
2answers
4k views

Show list of categories even if they have no posts

Is there a way to show a list of all categories available even if there are no posts associated with them. So if there is a post in that category then it echos a link and if not it just echos out the ...
0
votes
1answer
38 views

Home Page Template - Specific Category

I cannot find a specific solution to my situation. I'm sure this is an easy one though. I have my homepage set to display posts. How can I narrow the posts to a single category? I've looked elsewhere ...
-2
votes
0answers
9 views

Showing descriptions in Woocommerce category widget

I'd love to display category descriptions under each category in the product-category widget that comes with Woocommerce. How exactly would I go about doing so? Cheers!
0
votes
0answers
14 views

Run foreach loop again, e.g. when another parent category exists

I've been struggling with my breadcrumbs on a project I'm working on, I finally got the code to work using foreach loops to get the values I wanted and show a category_name and slug if needed. This ...
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
1k views

Show custom menu in category and its posts

I have a category X of posts. The category page and it's individual posts are all part of a custom menu consisting of pages and posts. My submenu, in the sidebar, works fine for showing on the pages, ...
-4
votes
0answers
15 views

Older and newer pagination

i created a category.php to display latest posts of category 'comics', what i am trying to do is to show older and newer navigation to display older posts or newer posts in the same format. Can anyone ...
2
votes
2answers
1k views

Wordpress Child Category Display All Posts

I am creating a Wordpress page where all my posts in the child categories of team are displayed in a grid. I got this working with the below code. The formatting and general layout is great however it ...
0
votes
0answers
18 views

Auto assign product category based on vendor [WOO] [closed]

So i have done my fair share of googling and fiddling with functions.php with no luck so far. So here's what i want to achieve. Say there are multiple vendors: Vendor1, Vendor2, Vendor3 and so on. ...
1
vote
0answers
14 views

The arrangement of categories always change while posting article

The arrangement of categories always change while posting article. How do I fix the arrangement of categories? Can I give the categories weight? Example categories start with Tech, Sports and ...
0
votes
0answers
14 views

Creating a cross-category search page

I'm working on a page for a legal foundation. They have a "Cases" category for posts related to cases they've covered. Almost all of them also have other categories, for example "Aboriginal Justice". ...
0
votes
0answers
14 views

Adding a title attribute to category without

I'm tring to use (to have a title attribute in the category): <?php foreach($categories as $category){ echo '<a href="'. get_category_link($category->term_id ) .'" title="'. $category-&...
-1
votes
1answer
444 views

Changing Woocommerce categories programatically

for the last two days I am trying to find a solution to this little problem. I want to change the categories of certain products programatically, so far I have this It seems quite logical for example ...
2
votes
1answer
49 views

How do I remove “Uncategorized” from posts with more than 1 category?

So recently I moved a client from Blogger to Wordpress. When the posts imported from blogger, it saved the blogger "labels" as "tags" in Wordpress. Since I'd like to have these as categories instead, ...
0
votes
1answer
806 views

Related posts widget - category

I want to edit this widget to display related posts from the current category. This code below display only posts from a category that I must select manually. What I want to happen is that the widget ...
2
votes
4answers
1k views

How to sort list of custom posts to get view like a tree of posts under categories and their children's categories?

I'm new here and my english isn't perfect so I'm sorry for this :) I'm here because I'm workin on site with post list sorted by category and I have problem with sort out my posts in categories and ...
1
vote
0answers
15 views

School & class blogs: Categorize with categories or custom posts?

A school is using WP as the presentation frontend. Posts are created to publish news (category news), articles (category articles) and featured content (cat. featured). The school would like to use ...
-2
votes
0answers
14 views

get_categories - how to replicate with WP_Query?

I have a slider on my front page that makes use of WP_Query and there fore uses the_post etc like this: $feat_query = new WP_Query( $args ); if ($feat_query->have_posts()) : while ($feat_query->...
0
votes
2answers
18 views

Keyword search in multiple categories

I've spent a day or so on this now and I'm turning to the community for assistance. Firstly, I am trying to achieve something like this post: Wordpress Multiple Category Search In my theme template,...
0
votes
1answer
442 views

“Trying to get property of non-object” error when using custom taxonomies

I am encountering a weird error when working with custom taxonomies. I am trying to get the name of categories of a custom taxonomy: $terms = get_terms('taxonomy_name'); foreach ($terms as $term) { ...
0
votes
1answer
702 views

Custom url structure - pages under a custom post type

I'm struggling with the structure of my Wordpress site and I was hoping you might be able to give me some advice. The site is for a series of events and the structure is as follows: Gateway (...
1
vote
1answer
3k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
0
votes
1answer
655 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 ...
0
votes
1answer
21 views

How do I add Category Body Classes to Admin?

So why are category classes not added to the admin body class with this function? I see the current post ID in page source as part of the complete body class, so the basic function of adding body ...
0
votes
0answers
16 views

Get array of parent and other child categories based on one child

I'm trying to modify a custom wp_query that's generating related posts. Currently, it's returning other posts in the same category, which is a sub-category. I'd like it to ALSO return posts from the ...
0
votes
2answers
415 views

Categories and Tags not working!

I'm at the final debugging stages for a major web design project I've been working on for the last 6 months. The site itself is based on the has become a bit of a behemoth (merging 4 existing sites ...
5
votes
5answers
2k views

Different number of posts in each category

I have categories driven site. I have different template for each category. I would like to set different number of posts – different for each category. Plus I would like to add proper previous and ...
0
votes
0answers
15 views

How to use $prev_url and $next_url to display posts only out of a specific category

Struggling with a function used to display a previous and next button on a single portfolio page. I have set two pages up with display of a portfolio. Each page displays a portfolio with a unique ...
0
votes
1answer
12 views

Precedence of page permalinks over woocommerce product category links?

I have a situation I cannot quite understand, and wonder if someone could help me do so. We are developing an e-commerce store (WP + Woocommerce) Individual artists are represented by Pages (each ...
1
vote
2answers
54 views

Is there a way to list posts of only a certain category

I want to add a new menu point to post that shows posts of a certain category. Adding a new page is easy if it is just a new post type. But I want to only show posts with a specific category and when ...
0
votes
2answers
672 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 ...
4
votes
1answer
232 views

How to sort posts by last name (2nd word) on ONE category only?

I have an "author" category that is used as a list to browse multiple posts containing author biographies. I have Smart Category Ordering installed and right now it is sorted by title ascending. ...
0
votes
1answer
17 views

Conditional statement: if is_category, append at the end of page

I'm really new to code, so forgive me if the question seems dull. I have set up a very simple WP site its only purpose is to collect content from authors to then export some xml file in order to ...
0
votes
0answers
5 views

Wordpress SEO - Category, page or both?

I've a doubt on which could be the best solution to rank my pages. I'm not sure if I should focus on category pages, or create a proper product page. Example: I've a website that speaks about Samsung....
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 ...
1
vote
1answer
923 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
1answer
27 views

Add new post only in assigned category

Is there any possibility or plugin, that alows me to add a user (example author role) who could add posts but only in one category?