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)

2
votes
1answer
1k views

Get a permalink structure of /%posttype%/%category%/%postname%

I have a custom post type named Reportage, added in functions.php: add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'reportage', array( ...
1
vote
1answer
2k views

Link Attachment Image to Category

How do you link an attachment image to its category? function wp_attachment_image($size = thumb) { if($images = get_children(array( 'post_parent' => get_the_ID(), ...
0
votes
2answers
404 views

Related Post by category, but not current category child

I need an help with this code. This one works perfectly, but I have this problem I have one category (A) and 2 subcat (C) & (D)... so when I watching the post on a category (C) , I would to ...
2
votes
2answers
145 views

Server-side subscribe by email?

Is there a server-side email solution that will allow users to subscribe to updates via email and, specifically, also be able to do this by category? I'm aware of Aweber and Feedburner being able to ...
0
votes
1answer
2k views

Regex problem in an add_rewrite_rule

I'm working on a category page for a custom post type called articles in WP 3.1, and I'm having some trouble with extracting the page number. The url: /articles/category/background/ Currently, what ...
0
votes
1answer
669 views

Exclude posts without category from loop

I'm trying to exclude all the posts that doesn't have a category assigned to from the main loop, i searched everywhere and i found a billion ways to exclude some categories or filter from specific ...
0
votes
1answer
181 views

Wordpress MU 2.9.2 to 3.0.5 changes to category.php

In the latest version of WP I see the category.php page is now using edit-tags.php. The version Im running seems to have an issue with the search feature on this page whereas the new version doesnt. ...
1
vote
2answers
94 views

Categorising posts/pages into years published

I have a lot of posts/pages, and I would like to create a list in my sidebar, showing all of the years that I have created posts/pages in, so for instance, if I have 5 posts/pages that were spaced out ...
1
vote
2answers
903 views

adding custom fields to next and previous post link

Im trying to make my next and previous post buttons display my custom field but for some reason it doesnt display the custom field its just blank. Heres my code. <div id="next-prev-links"> ...
0
votes
1answer
181 views

How to create a custom loop ordered by Categories on a Page Template?

Ex. Category 1 Post 1 Post 2 Post 3 Post .... Category 2 Post 1 Post 2 Post 3 Post .... Category .... Post 1 Post 2 Post 3 Post ....
2
votes
1answer
418 views

“NOT ONLY IN” taxonomy query operator?

I have multiple users adding content to restricted categories (using RoleScoper) in my WordPress setup that don't show up on the homepage (custom template with query_posts()). I'm looking for a way ...
0
votes
1answer
1k views

How to put page numbers with the next/previous on a post/category list?

Is there a way to add numbering to the latest posts/category listing pages? By default you can put older/newer, but is there a way to add numbering like page 1,2,3,4 of the list so people can skip ...
1
vote
3answers
1k views

Check if post belongs to any category

In my homepage loop, I have something that will show which category the post is in. It will say something like "Posted 4 hours ago in Sports by ...". However, when there is no category set, it will ...
4
votes
2answers
3k views

What's the URL for a category archive?

If my category URL is: /blogs/category/foo and my archive URL is: /blogs/2011/02/ what's the URL for 'foo' blogs from February 2011?
0
votes
2answers
9k views

Add custom field to Category

I'd like to Add custom field to Category. I mean when I creat a category I only have Name: Slug: Parent: Description: Since I have a TV Series Site, I want to add some more fields, I want ...
0
votes
1answer
318 views

Showing different posts on category pages

I'm using the following code to display posts on my category page but would like to carry the same format through on to the second page of the category as at the moment it moves to the second page but ...
0
votes
2answers
2k views

How to? Redirect /category/sci-fi/ to /category/scifi/?

I changed the wordpress category slug from "sci-fi" to "scifi" a few months back by accident. How can I redirect /category/sci-fi/ to /category/scifi/ so that /category/sci-fi/page/2/, ...
-1
votes
2answers
3k views

How to: 301 Redirect /category/ to /customname/

I've changed our "category base" in WP settings from the default "category" to "customname". Now there are 404 errors to links containing the old category slug eg. mysite.com/category/names What do ...
1
vote
2answers
559 views

How to detect filter in URL in Category page?

I need to add an additional filter based on a category for posts that have a custom post_type. For example, I have a page located at /category/tasks that lists all tasks. I need to make it so I can ...
1
vote
2answers
859 views

Broken category pagination

For some reason the below code works until I hit the third page and gives 404. Is it possible to fix it without using any plugins? <?php $temp = $wp_query; $wp_query = null; $wp_query ...
0
votes
1answer
1k views

Showing one post from each category, paged?

I want to display one post from each category per page. So the first page would contain the first post of cat A, the first post of cat B and the first post of cat C. The second page would contain the ...
0
votes
1answer
983 views

Listing all slugs?

I have a number of slugs and items in my custom category: SLUG - number video - 5 items music - 5 items [no-slug] - 5 items empty - 0 items blabla - 0 items I want to list all non-empty slugs ...
1
vote
2answers
299 views

Category specific themes?

My client wants to implement a special appearance to each of our category pages. Kind of like child themes... she wants to shift the background image, change a few graphics, and tweak the colors ...
1
vote
2answers
2k views

Listing Category 'child_of' by slug rather than ID

I want to list categories belonging to a parent. The problem is using category id's isn't useful and makes things harder to understand. Is there any easier way to list categories belonging to a ...
4
votes
3answers
5k views

add_action hook for completely new post?

publish_post Runs when a post is published, or if it is edited and its status is "published". Action function arguments: post ID. -Plugin API Documentation I've added the publish_post ...
1
vote
6answers
936 views

Append HTML to an LI of wp_list_categories

Im currently using <?php wp_list_categories('child_of=4&title_li='); ?> to echo out a list of my categories. I'm wondering how I could append some html (specifically an » to the end ...
2
votes
1answer
826 views

Anyway to assign custom post types to a specific category?

Is there anyway to assign all new posts that have a custom post_type to a specific category? For example, say I have a post_type that is for Actors. Is there anyway to assign any post that is under ...
3
votes
2answers
2k views

How can I hide a category from Contributors in the edit/add new post screen?

I have a situation where I need to hide a specific category and it's children from users who are logged in as Contributors. I don't want them to see this category and it's children in the categories ...
1
vote
1answer
1k views

Filter Categories widget to allow custom sorting?

Man, I can't seem to ever get done with enhancements to WordPress categories. I hope there's more work done on core category options in the future. Especially with the emergence of site theming and ...
0
votes
2answers
133 views

Can Categories be used to hack a Multisite-like setup w/ a single MySql db?

I have a project which will effectively create multiple blogs that will be fed existing content (don't worry, this isn't copyrighted content from other blogs or anything like that). From a DB ...
1
vote
1answer
931 views

wordpress wp_list_categories

i'm using wp_list_categories like so: <?php //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin) $taxonomy = ...
0
votes
2answers
188 views

Length of Category Names

Based on this post, I'm hoping to create good categories now, that I won't have to change much later. Can you change a category name later, without having to go back and re-categorize all articles? ...
0
votes
1answer
201 views

Displaying categories in different template problem

Greetings! Sorry for the vague title decription - Couldn't word it any different. In my index.php page I have the following code: <?php if (is_category('6')) { ?> <?php include ...
1
vote
2answers
2k views

Trouble with editing template for “List category posts” plugin

WP 3.0.4 local installation, multisite network enabled theme: Twentyten plugin: List Category Posts v .15, network activated I've created the folder list-category-posts inside my theme folder, and ...
1
vote
1answer
555 views

Exclude a category from the_category in the single post page

I want to include something like the the_category function in a WordPress post, which by default echoes a list of links to all categories the post is attached separated by comma, but I want to exclude ...
0
votes
2answers
2k views

Changing the category permalink structure

Hopefully another simple one, I have some nested categories, like this: - category-a - category-b -category-c The permalink for category-c is as follows: ...
1
vote
5answers
3k views

On the category page, get the category object

Right, hopefully a nice and simple one... I'm on a category page with the id of 4, I want to get the category object back so I can interogate a few values. I've had a good old look in the WP codex ...
1
vote
2answers
4k views

If category is in parent category?

I have function that check what is main top category of post. So i have category tree like this Foo -bar --foobar cat2 and if post is in foobar, my function post_is_in_descendant_category shows me ...
2
votes
1answer
1k views

Plugin for changing a post's category based on it's post date?

Is there a plugin for Wordpress that will change a post's category based on how long that post has existed? I have seen other Wordpress plugins that use a library called "simple pie" to manage a ...
0
votes
1answer
2k views

Overriding default calendar to show posts from a category

I'm trying to modify the default WP calendar (get_calendar()) so that it shows posts from a specific category and then use that as a shortcode. Here's what I've done: Copied across the ...
0
votes
1answer
301 views

Post thats in Two Categories, only want to display name for one

In my Wordpress site I've created, I'm having issues hiding or not displaying one of the category titles I set up. I'll try to explain better. Wordpress Admin Side I have a post that is in two ...
1
vote
3answers
682 views

Categories not working - 404 Not found error

I have a community blog at thelazy.info . All things are working except the category. When you click on any category it gives 404 Not found error. I tried searching out myself but couldn't come up ...
1
vote
3answers
346 views

filter “inactive” categories from wp_list_categories?

I'd like to add a checkbox to the category editor screen to allow the category to be "deactivated" (perhaps while the site owner works on the category content and posts). Once I've done this, what are ...
0
votes
2answers
763 views

Limit get_categories to show each category once

I am trying to create a home page where it is a list of categories with an associated thumbnail for each. I would like it so it returns each category once and returns the associated thumbnail from ...
2
votes
1answer
1k views

Categories assigned to custom post type not found

Here's my issue: I have assigned a custom post type to certain categories. When I search for these categories, either through search or entering the url directly. However, if I assign a normal post ...
1
vote
1answer
1k views

plugin for wp_list_categories with posts

Is there a parameter that can be passed to wp_list_categories, to get a certain number of posts from each category? Or a plugin that does something like that? A similar question was in the Wordpress ...
0
votes
2answers
217 views

Is there an easy way to get a list of Category IDs?

I'm working with a couple of plugins that ask for a list of category IDs to include/exclude. When I go to the categories section and select "Edit" I don't see an ID field listed on the page, though I ...
0
votes
2answers
412 views

Best/Correct way to add an option to a category

I'm currently writing my first plugin, which will let the site admin/editor use a different image as a background/header for each post/page, and I would also like to have defaults for each category. ...
0
votes
1answer
662 views

Categories will only display links to posts

Hey I'm currently using the Titan theme for my website and I want each category to display each FULL posts for that particular category, but with my theme Titan this is not a option. I only get links ...
1
vote
3answers
748 views

Show posts on a page based on a category and tag(s)

I have been looking all over the internet for this, and have not yet found an answer I could use. Found out that I may can use something called query_posts or get_posts, but I have no idea how to use ...