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
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 ...
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 ...
1
vote
0answers
346 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
97 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
807 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
235 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
559 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
408 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
62 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
793 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
400 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
72 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
128 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
545 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
2k 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
344 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
680 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
444 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
556 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
412 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
1
vote
1answer
157 views

How can I show 1 featured post in a styled element, and the next few below differently styled

I'm looking for some thoughts, ideas, and/or direction on what is the best way to accomplish this: Basically I want to have 1 "featured" post in a differently styled div, and then display the next ...
0
votes
1answer
686 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 ...
0
votes
1answer
1k views

wp_update_post is not updating category

I am using this custom function to add a publish/unpublish button to the front end of my site for the users: if ('draft' == get_post_status ($post_id)) { $post = ...
0
votes
1answer
499 views

Make wp_dropdown_categories into a variable that persists until changed?

User selects category1 from wp_dropdown_categories, if user clicks on tag2 any point after, they only see posts from category1 with tag2, not all posts with tag2. Is there a way to store the chosen ...
0
votes
1answer
262 views

Using pagination with multiple loops causes it to break

I'm have two loops on my index page. One fetches the latest posts from the 'work' category and the other fetches the latest from the 'blog' category. (see below) I am also using a plugin called ...
0
votes
1answer
401 views

Split multiple categories into two columns

What is the best way to split multiple categories into two columns on the page? At this moment I don't need category-A to go into column-1 and category-B/C/D to go into column-2. I just need multiple ...
0
votes
1answer
128 views

Editing Loop So It Targets Specific Tags?

Confused on how to achieve this, but what I'm trying to do is load posts with the tag "reviews" in the loop on the homepage. Index.php: <?php /* Start the Loop */ ?> <?php while ( ...
0
votes
2answers
244 views

Change Default Content when Creating a Post based on Previous Category Choice

I'm working on a system that forces users (unfamiliar with wp) to choose a category before creating a new post, and then adds some appropriate html layout styling to help them. The following code ...
3
votes
1answer
131 views

How can I create a loop to build slides based on multiple categories using Coda Slider

I'm using a loop to generate the slides I need for a Coda Slider slideshow. The slides should be pulling the most recent post from 5 different categories. The problem I'm having is that it's pulling ...
8
votes
2answers
257 views

Individual rss feed entry length for categories?

I know how to retrieve the rss2 feed from a category in wp, namely adding /feed behind the category name. However when I do this, not all entries from that feed are included in the rss, this is ...
1
vote
0answers
107 views

Older entries link within category page

I am building a custom wp theme and I have a category called 'blog'. On here I have all of my posts displaying from the category 'blog' and a link at the bottom that says older entries. When i click ...
1
vote
1answer
156 views

Category index featured image

I wish to set a featured/header image for each of my category archive pages, how would I go about doing this without hard coding each category into the theme? An example of the page is at ...
0
votes
1answer
1k views

List products from current category

This code is from the archive page and list all products with a certain tag, can someone please help me to modify this code to make listing products only from current category: <?php if ( ...
4
votes
1answer
993 views

Add forward slash on categories url (serve one version of a url)

How can I a add forward slash on categories URLs and serve only that version of a category (meaning URLs not ending in forward-slash will redirect to URLs ending in forward slash). I manage to remove ...
1
vote
1answer
81 views

change recent posts based on category

I am writing a code to display the recent posts of different categories. On clicking category 1, I want to display the recent posts from cat1 and on clicking cat 2 the recent posts from cat2 and so ...
0
votes
1answer
589 views

Show last post from multiple categories using wp_list_categories

I have the following code that lists out the children categories on a separate page when you click on its parent category. The code renders a list like so: Home › Archive for IQ Issue 7 Journal ...
1
vote
0answers
243 views

How to create a custom url for a category

I took over a site that displays the category in the URL three different ways. For some categories it shows "?category_name=blah". (Not ideal, but I can live with it) For newly created categories ...
0
votes
1answer
85 views

Exclude Specific Categories?

the code I'm currently using to display categories is <?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' ';}?> I would like to exclude a category called ...
0
votes
1answer
2k views

show category in woocommerce

This code show tags from a specific category such as id = 3. I want to make automatically check which category I am. Can someone please help me ? $args = array('categories'=> '3'); $tags = ...
0
votes
1answer
311 views

wp_delete_term or wp_delete_category?

Hi I need a simple piece of code to delete a category for a custom plugin, but I just found two function references that seems quite the same: Function Reference: wp_delete_term Description: Removes ...
1
vote
2answers
3k views

Combine Multiple Categories Into One URL Slug

I have a Wordpress website with 20+ categories. To make it easier to navigate I want to decrease the categories, but at the same time keep the original categories. In other words I want to be able to ...
1
vote
1answer
569 views

How to get grandparent of a given category

Just wondering what the best way to get the top-most level category (grandparent) of a given category assuming it has one? Example structure: Operating Systems - Mac - - Mountain Lion - Windows - - ...
1
vote
1answer
1k views

Parent Category link to its sub categories on different page

I am creating a magazine style wordpress site. We have multiple issues which will be parent categories and these will have around 3-5 sub categories. Every quarter we will create a new issue with new ...
2
votes
2answers
2k views

Different templates for parent and children categories/taxonomies

I would like to know what is the best way to create a different template for parent and children categories and/or taxonomies. Example: I have a taxonomy called region, which I want to divide in ...
1
vote
1answer
1k views

Get Tags specific to Category using WooCommerce plugin

Could anyone help me to implement this code in WooCommerce, ie instead of categories to use product categories, and instead of tag to use product tag. In functions.php : function ...
1
vote
1answer
945 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: ...