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
74 views

Count to how many categories a post belongs to

Is there a possibility to count to how many categories a post belongs to?
1
vote
2answers
458 views

Query Posts Exclude Entire Category

I am using the standard wordpress loop that looks like: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h2><?php the_title(); ?></h2> <?...
13
votes
3answers
8k views

Only one category per post

How to make each post/page have one and only one category. Categories could have radio box instead of checkbox next to each.
0
votes
1answer
38 views

Is the part “category” fixed to an URL to an archive or post?

I'm asked to set up a WordPress-based site, which is not intended to run as blog mainly but anyway we want to use the common article area sometimes. Now my client resents that the URL to an article or ...
0
votes
1answer
681 views

How to get Next/previous_post_link to go through articles in top parent category

I have a magazine format where a parent category is an issue, sub categories are the sections and the articles go into their respective sections. When viewing an article in a magazine, I would like to ...
0
votes
1answer
876 views

Custom post type specific category box

Is it possible to give a custom post type its own category box? If I use 'taxonomies' => array("category") or register_taxonomy_for_object_type('category', post_type); I get the desired box but ...
0
votes
1answer
156 views

How to add all categories into an array and extract the categories names and use it with a custom meta box

Basically I need to add custom meta boxes to pages and one of this options must be a list of categories from previous posts. I've managed to add the metaboxes and wrapped the categories in a array, ...
0
votes
1answer
553 views

Posts not listing out sub category in hierarchy

I have a magazine like post structure like so: Parent -> Sub category -> Article. The parent is the issue, the sub categories are the sections within the magazine like news and interviews etc ...
1
vote
1answer
115 views

How to get the id from the custom category?

How do i get the ID from the current custom taxonomy (category) the user is browsing? It uses a custom post type called "products" The categories are called "pcategories" With normal categories i ...
2
votes
1answer
1k views

Get tags specific category

I use this code to get tags from category. get all tags from category I want to display in the category page the specific tags. I have 8 categories and this is my code: <?php if (...
1
vote
1answer
109 views

Show Available Taxonomy List with Current Category

As you can see from the image, I am listing all categories and the cities (taxonomy list). What I want to do is : If Car classifieds is selected on cities list show the city name which has car ...
0
votes
1answer
167 views

Change rss title of individual feeds?

I want to set a custom title to indiviual rss feeds. Right now my post feed runs under a page called podcasts and the title of my rss feed then becomes <blog name> » podcasts because it is the ...
0
votes
1answer
1k views

creating categories programmatically

I'm creating a batch uploader and it would be good if I could also add categories with parent categories to my posts. I have the following code: $my_cat = array( 'cat_name' => $...
-1
votes
1answer
269 views

Sticky post for all pages and categories

I want to have a sticky post for all my pages and categories. The choice of "sticky post" in the edit post, didn't work. I found many pieces of code but I haven't the result that I want. I prefer to ...
-2
votes
1answer
383 views

Weird html output of single_cat_title - is not inside of the html element?

I'm displaying a single "featured" post at the top of the blog index page, and category pages. I'm using this conditional to display the category name of the category page if it is a category page, ...
0
votes
1answer
3k views

Get 1st parent category id from post

I have this structure for my categories: Issue 4 - News - Supporting our troops - Breaking news <?php $category = get_the_category(); $parent = $category[0]->...
0
votes
1answer
312 views

Post to inherit custom category background image from parent

I have a custom field on a category where you can add an image. I have it as a background image to show on the category's archive page, like so: archives.php <body style="background:url('<?php ...
1
vote
0answers
426 views

Custom category URL rewriting

Here is the situation: let say I have a page called Press and that page has this url: www.example.com/press-center Now, let say that I have a category Press (slug is press) and subcategory called ...
0
votes
1answer
86 views

Exclude categories from homepage but not from sidebar

I would like to exclude categories from my homepage, but I want them to still display in the sidebar shown on the homepage, how can I do that? At the moment my code excludes from both the content ...
2
votes
4answers
2k views

How to show custom static content at top of each category page?

I want to display custom static content, essentially an image and a small description, at the top of each category page (different for each category and sub category), displayed above a list of titles ...
0
votes
2answers
713 views

Reversing the order of items in a category rss feed?

Is there an easy way to reverse the default item order of a category rss feed? Default: Last posted item first Wanted: First posted item first No plugins please, plain wp api function calls (such ...
3
votes
1answer
13k views

Get the children of the parent category

I'm trying to get all the children categories to display in this loop but I'm struggling with the code. This is what I have so far. <?php $args=array('orderby' => 'name', 'order' => 'ASC'); ...
0
votes
2answers
2k views

Pagination for a category

Hi I have page displaying 20 featured images and info of a specific category, I wish to able to have pagination so I can have multiple pages for the category. How do I do this? I cant seem to get it ...
0
votes
2answers
154 views

Should I use “Categories ” or “Pages” for a WordPress Static Site (A non blog site)?

I want to use WordPress for a Company Site which is not a blog; that will have regular pages, such as "About Us", "our Products", "Our Services", etc. What is the best way to use WordPress for this ...
1
vote
1answer
448 views

category.php displays ALL posts instead of just those with the current category

I'm simply trying to display a list of categorised posts (with the custom post type of 'project') on the default category.php page. I can't get it to work! If I simply use the base theme category.php ...
0
votes
3answers
755 views

Sidebar limiting to 10 posts?

I have the following code inside my single.php page: UPDATED CODE <?php if (have_posts()) : the_post(); $post_id = get_the_ID(); if ( is_single() ) { $cats = get_the_category(); ...
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 ...
1
vote
1answer
31 views

date issue with category post retrival

I am trying to retrieve all posts from an rss feed from a category, and I have working code that does this. However, on one category I will only get all posts until a certain date. Any post prior to ...
0
votes
1answer
129 views

How can I sort posts ascending by post title for a specific post type, but on a category archive template?

How can I sort posts ascending by post title for a specific post type, but on a category archive template? My schema involves a "video" custom post type and multiple subcategories of the ...
2
votes
1answer
4k views

Filter front page posts by category

I have three categories (news, pics, vids), but I have all of them showing up on my front page. I would just like the front page to have the news category (and possibly uncategorized category) to show....
1
vote
1answer
5k views

How to split the categories of subcategories with thumbnails

This is the code I use to display all product categories with thumbnails: <?php $cats = get_terms('product_cat', array( 'hide_empty' => 0, 'orderby' => 'name' )); ?> <div class=...
1
vote
0answers
349 views

Category archives with monthly pagination

How would I go about doing the following: I need to setup a prev/next type pagination where posts within a category archive are split into months. For example, if I navigate to the News category, I ...
0
votes
1answer
98 views

Putting a Category of posts under a Page

I have a website say mysite.com and there is a blog mysite.com/blog.When i post a new post under blog category its appears like mysite.com/newpost.I want the posts under blog category to be displayed ...
0
votes
2answers
831 views

How can I use AJAX with check-box categories?

How can I build a search filter (something like this) with WordPress? I have a custom post type name: "Locatii". It is a custom post type with categories. Ex: Cat 1 , Cat 2 ... and so on. How can ...
1
vote
0answers
236 views

List only child categories within posts

I am using the_category() to display categories in my posts that are also filed in child-categories. Unfortunately this also displays the parent category which i would love to hide. Is there a way to ...
1
vote
2answers
572 views

Show Heirachy of categories in WP Download Monitor

I have the Download Monitor Plugin installed and it works beautifully, I just have a question regarding the categories. I have a parent category, Issue 0, which will have anywhere from 3-6 sub ...
0
votes
1answer
428 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) { ...
1
vote
0answers
66 views

How to build a simple nav system of custom post type categories and its posts?

I've been searching the web for a long time now, but couldn't find a solid simple anwser to, what seems to be a basic question: I have to output a list of custom post type categories and the posts of ...
0
votes
1answer
802 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 ...
0
votes
2answers
403 views

Viewing category won't show up Custom post type posts

I'm having a strange problem: I've build a category page and want to load up all related posts of a custom post type but won't give any results. I'm using the following code: query_posts( array( '...
1
vote
0answers
73 views

List posts in a category grouped by other categories?

I have posts of stores and restaurants in my area. Each post is marked by category of type (e.g. Restaurant, store) and town. What I am trying to do is create a page for each town (with intro text ...
1
vote
0answers
129 views

Get Number of total Parent Categories for Custom Taxonomy

I am running an artist feature blog where I do interview artists from different countries and post some travel stuff from different countries. I've set up a Custom Taxonomy called "Artist Name". This ...
0
votes
1answer
555 views

Display all categories as plain text

Within my loop i'm currently outputting one category that a post is assigned to as plain text. Its being used as a class name within my markup (not visible to users) but if a post is assigned multiple ...
0
votes
1answer
3k views

get posts from Custom Post Type & Category

Ok, I've been frustrated about this one: I've got a category page with the Title + Description of the title. Under it I would like to show all the (custom post type, 'blog') posts related with this ...
0
votes
1answer
349 views

Change next_post and previous_link to navigate throught parent categories only

I have this unchanged code from template-tags.php which links through all of the posts on the site. However I would like to restrict it so that it only links through the articles which are in the same ...
0
votes
1answer
691 views

Problem with different query loops (and “main loop”) on category template page!

so, heres the problem: i've created a category-template (category.php) with two query loops and the main loop (in which the content from the category should get looped in). if i now click on a ...
1
vote
2answers
453 views

How to Make a Category Always Selected?

I'm trying to write a function to make certain terms of default category always selected. When the user is writing a new post, the term checkbox should be checked and he shouldn't be able to unckeck ...
2
votes
2answers
563 views

Restrict access and display for categories

Is it possible to choose specific categories that will only be displayed to logged in members? I tried to find a plugin or a PHP solution that does that but could not find anything that was still ...
0
votes
1answer
417 views

Natural sort / ordering wp_dropdown_categories

I'm using the following code to display an archive dropdown: wp_dropdown_categories( 'taxonomy=week&hierarchical=1&orderby=name' ); However the format of the taxonomy is week-1, week-2 ....
1
vote
1answer
2k views

woocommerce product category tabs [closed]

Can someone help me how to generate dynamic tabs with product categories in woocommerce. - product category as tab name, and their subcategories thumbnails as tab content