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)

4
votes
2answers
352 views

Multisite - Protect categories from deletion?

UPDATE: For anyone following this thread, the plugin solution does work, but seems to have a problem on my multisite format. I have now tested on 3 individual installs and on 3 multisites. On the ...
4
votes
2answers
567 views

Changing Top Level Items into Radio Buttons in the Categories Meta Box?

I know it is possible to change the WordPress category list to radio buttons in the admin panel for posts, but I would like to make the just the Parents radio buttons and the sub categories or ...
3
votes
1answer
157 views

Filter by post category in Media Library

I am trying to find a way to filter the Media Library by the Post Category that a Media item is assigned with. I can see that you can sort by "attached to" but this only get me a little of the way ...
3
votes
2answers
568 views

Using URL parameters, list posts from category and custom taxonomy

For example, http://example.com/?cat=6&tag=books lists posts that belong to category ID 6 and tagged 'books' (i.e. posts that satisfy both conditions). Similarly, ...
3
votes
1answer
3k views

Get posts from sites in Multisite?

I'm trying to pull multiple sites posts. For example, I can pull out a single site posts by a category and total posts 10. But I'm trying to pull out both posts from two separate Multisite blogs 1 ...
3
votes
1answer
981 views

How to convert regular categories to custom taxonomy?

I have a big list of categories/subcategories (around 60 in all). It now makes sense that instead of these categories being available to any post type's category list, these categories should be moved ...
3
votes
1answer
460 views

Redirecting specific category to subdomain

I have a problem in following situation: I have 2 separate Wordpress 3.3.1 instances, main at domain.com and one of them (which consists of simple Q&A type site) is available from subdomain ...
3
votes
2answers
3k views

Display list of Sub-Categories and the posts they contain, within one main Category

I've found tons of code and plugins to do various things; from show posts for specific cats, subcats of a cat, etc.. BUT, I cannot for the life of me find, nor do I know the WP API well enough to do ...
2
votes
1answer
2k 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'); ...
2
votes
2answers
7k views

Setting Custom Sort Order of Posts within a Category

I've got this category setup that includes several posts. By design it's not a blog, but a staff listing. Currently all of the staff members have their own posts with the category. I'd like to be able ...
2
votes
2answers
713 views

Wordpress: category page not for post's

Please at first let me explain my question. I use wordpress to create web sites for flash games, so I don't have certain page for post's. I add each game by post-new.php?post_type=game and u can see ...
1
vote
4answers
509 views

How to get next previous category in same taxonomy?

Like WP get_adjacent_post function gives the next and previous post data based on the parameters i want to get the next/previous category data is there any WP built in function which does the right ...
1
vote
3answers
278 views

How to add style to category link?

<h1><?php the_category(' &bull; '); ?> » <a href="<?php the_permalink(); ?>" class="my-title-class"><?php the_title(); ?></a></h1> How to add ...
1
vote
2answers
49 views

is there a better way of combining this?

Hoping someone can point me in the direction of writing this in a more succinct way. I'm working on my website, and want to display a total of 5 posts from the category 'general wonderings'. The ...
1
vote
1answer
731 views

Hide/Show only specific categories in wp-admin new-post.php

Can anyone give me a function or an idea of the method I would need to use to hide categories from the selection box in wp-admin? I have a custom post type and I would like my authors to be able to ...
1
vote
1answer
892 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 ...
1
vote
0answers
53 views

Listing and accessing categories for a custom post type

I have two post types: Projects and Events. I want each of these post types to have their own categories: Upcoming and Past. I have an archive page displaying the posts in these types. However, on ...
1
vote
1answer
113 views

Categories or Custom Post Type to Organize Content

Let's say I'm starting a martial arts website and I want to categorize content into themes: philosophy fitness training techniques diet Etc. I keep going back and forth between using custom loops ...
1
vote
1answer
970 views

Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#

So I've Googled and followed countless tutorials, read documentation on MySQL, Visual Studio, WordPress, and Plesk. I try to leave posting on this site as the final option and it seems it has come to ...
1
vote
1answer
226 views

exclude category from WordPress Form function

I have this function and I need to somehow exclude a category number 14 from my submission form. Is there any way to do it inside this function? function retrieve_cat_data($byid = false){ ...
1
vote
1answer
81 views

How can you change the permalink for pages?

When I set my permalink to '/%category%/%postname%.html' this will work for all the posts, but the pages still don't have a .html at the end. Is there a way I can fix that?
1
vote
1answer
347 views

How to block a category from one user and enable the category for the rest of the users

I have a site in which all categories are open to anyone, except for 2 categories that are password protected: Students, and Teachers. They are open only to specific users types, as follows: The ...
1
vote
1answer
641 views

Redirect category to first available child post

Is possible to redirect category to first available child post please? Thanks!
1
vote
1answer
1k views

Wrap Post count in a span

I'm using this code: $args = array( 'hide_empty' => FALSE, 'title_li'=> __( '' ), 'show_count'=> 1, ); wp_list_categories($args); How ...
1
vote
2answers
2k views

get all tags from category

i'm displaying all posts by category in my template and i was wondering: is it possible to get a list of all tags used by that category? i only found out how to make a tag-dropdown but it's from all ...
1
vote
1answer
1k views

Fixing category count

Somehow my post counts are incorrect due to inserting rows via php. I have the following code to update the count, is it correct? global $wpdb; $result = mysql_query("SELECT term_id,term_taxonomy_id ...
1
vote
4answers
4k views

Category links suddenly started giving 404 errors

My Wordpress blog suddenly seems to have started giving me 404 errors when accessing category pages. For example, http://blog.rtwilson.com/category/tok-related/. Interestingly, this doesn't happen for ...
1
vote
2answers
848 views

Page navigation within a category

I would like to know why my page navigation within a particular category doesn't work. The code seems correct but I never see the pagination links. <?php $my_query = new ...
1
vote
2answers
2k views

Select category in custom query

I'm sure this question is asked alot, but I cannot figure it out, since all the different ways to query posts are confusing me.. Here is my current code. How can I tell the code to only get posts ...
0
votes
4answers
74 views

How to exclude categories from recent posts, recent comments & category widgets?

I use the bellow function (thanks to @helgatheviking!) to exclude categories from the wordpress loop. It works very well - posts of selected categories are excluded from the loop on the main blog ...
0
votes
2answers
45 views

Make parent category an optgroup

How to transform the parent category into an optgroup? Demo of what I want: http://fiddle.jshell.net/Pp7Ey/show/ Currently I have this code: $cat = $_POST['cat']; $data = array( ...
0
votes
1answer
27 views

Assign parent category to all posts that are already assigned to child category

All my website's posts are assigned to subcategories, but not to their parent categories too: Is there someway that I could massively assign posts to their parent categories too? My website has ...
0
votes
2answers
137 views

wp_update_nav_menu_item() to insert categories

In the script below, I'm attempting to dynamically add categories to a custom menu. Everything works great, except for the fact that the categories do not have hyperlinks. What am I missing in ...
0
votes
3answers
37 views

How can I add single catogory for custom post type?

I am add new post type called journal using below code it works fine. But I now I need to add a single category for this post type. That is I have two types of journal category normal journal and ...
0
votes
1answer
53 views

Retrieve latest post by multiple categories with ID

I have the categories listed below in my product post type. Category Name: Test 1 ID: 82 Category Name: Test 2 ID: 83 Category Name: Test 3 ID: 84 Category Name: Test 4 ID: 85 Now I want to ...
0
votes
0answers
87 views

Admin - post order by category and sub category

I am trying to get the list of posts ordered in the admin area when sorted by their parent category. Ideally it would sort like this: parent category 1 -child category 1 --post 1 --post 2 ...
0
votes
3answers
273 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 ...
0
votes
1answer
514 views

WooCommerce - show product child category from specific parent

I want to show only the current child categorie of one specific parent categorie. I found this code written by ialocin in this question: WooCommerce - Display product child categories from specific ...
0
votes
2answers
277 views

Optimal way to redirect home page to category archive?

Question What'd be an optimal way to redirect the home page of a WordPress site to a category archive without involving external factors (e.g. Apache's .htaccess) i.e. within WordPress? Why? (Only ...
0
votes
1answer
612 views

Order get_terms() By Custom Field

I want to order my categories like I order my pages. I've added an extra field called Order to my taxonomy, but how do I order my terms by this value? Adding and Saving my Order Value: /** Add New ...
0
votes
4answers
70 views

Use standard WordPress categories with a CPT

I've just converted all of my blog posts to a CPT because I needed them to be hierarchical. Problem is, I had categories assigned to all of the posts. How can I use the standard WordPress categories ...
0
votes
1answer
231 views

Random Featured Image Based on Category

I am looking to extend the below code to select a random featured image based on a specific category. The below works but uses an overall list of images to pull from vs a list of images based on ...
0
votes
2answers
97 views

Get the post_type of current taxonomy or category page

I want to get post type of currently visited category or term. As for example, I have post_type post and category named Blog. On Blog listing page, how can I get that this is a category of the ...
0
votes
1answer
424 views

Single.php Active Category Class

Currently by default (I believe) when you're on single.php, Wordpress doesn't add a "Active" class to the blog category you're viewing the single post in like it would for pages or if you're on the ...
0
votes
1answer
282 views

Checking for two categories in query_posts

How can I check two category_name values in the following query_post? <?php query_posts('category_name=recent-work&posts_per_page=1'); if (have_posts()) : while (have_posts()) : ...
0
votes
1answer
159 views

Show Secondary Sidebar on Category pages (archive)

My site has the following structure where one column is for the main content (articles) and the other one, on the right, is for the sidebar (primary sidebar). The theme allows me to change the layout ...
0
votes
1answer
81 views

How to make all posts in a category “unsticky”?

The other day I posted this question. Now I'm wondering how I can do the same thing except this time instead of making unsticky posts sticky the code should make the ones that already are marked as ...
0
votes
1answer
54 views

How to make all posts in a category sticky?

Total WP and web development noob here. As the title suggests, I'm trying to make all the posts in one of my categories into "stickied" posts. But so far I've had no luck. What I've tried is this ...
0
votes
1answer
578 views

How to have Multiple Archives Widgets, one archive widget per category (in a different page)?

Please read the whole question before assuming this question is repeated. After one day of trying plugins and tutorials, I am convinced that there is no straightforward method of achieving what I am ...
0
votes
1answer
198 views

How to display posts from specific category using get_option function?

I try to display posts from specific category only in a author page, using get_option function like in the code below but it does not work: <?php query_posts('cat='.get_option('admin_cat')); ?> ...