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
2answers
344 views

Get parent categories of custom post type

I'm trying to display all the categories that belong to the custom post type that the user is in. For example this post: http://bit.ly/1ANisxN Is a custom post type that belongs to this page ...
0
votes
0answers
43 views

Query posts by date - category and custom field

I have this scenario: Categories: 23Feb2015, 24Feb2015, 25Feb2015, 26Feb2015......30Jan2099 Every day i add 5-6 posts in to a different category (today posts are in category 26Feb2015, yesterday ...
0
votes
2answers
63 views

Assign category a default post type

This one has been bothering me for a few days now, so I'd really appreciate any help you can give me. Problem overview: I have a plugin which automatically creates a post and assigns the category ...
0
votes
1answer
95 views

Allow a user to 'subscribe' to different post categories?

Is there a way for me to have a tickbox on a category archive page that when ticked shows that category's posts on a separate page? I'm working on a system for my work where each user will be able to ...
0
votes
1answer
57 views

How the posts and categories connected each other in wp 4.1.1?

There are no post_category field in table wp_posts in my wp4.1.1 . How the posts and categories connected each other in wp 4.1.1? mysql> show columns from wp_posts; ...
0
votes
1answer
20 views

how to chang preview of list of articles of one category?

I have downloaded wp tempalte demo where I have articles dive into different categories. Each category has its own button in main menu. When I click to show the category, list of its articles are show ...
0
votes
1answer
91 views

show posts found in multiple categories via category_name query string?

I am attempting to allow visitors to filter posts in an archive to show posts that are found in two categories. The code is building the URL as follows: domain/?category_name=slug1+slug2 Previously, ...
0
votes
0answers
18 views

transform default widget_category in accordion

Im trying to transform the original widget category from wordpress as accordion; I can find the files which are: default-widgets.php and category-template.php HOwever my back end skills are quite ...
0
votes
0answers
33 views

How can I have preview of articles divided in categories in one page?

I have now 8 categories and each I will have more than 20 articles (posts). In my homepage I wanna show all categories with 3 newest post in it. When I create new post/article, I wanna automatically ...
0
votes
1answer
182 views

Category Page Custom Layout [closed]

I'm beginner in wordpress. I want to modify category page layout from this : into this : I'm using The7 theme. I have read this Category Templates, but still don't know how to. I have create ...
0
votes
1answer
173 views

Get current_parent_category in a loop or Cat ancestor- big problem

Im having some trouble since a week now . .. I'm having a bad time with that ! I explain my situation: I have setup a style for post category. (a background-color and a small image background). ...
0
votes
0answers
61 views

Creating an archive page listing external data

I am working on a plugin that displays external data, within WordPress. I am attempting to create two pages. A listing/archive page, and a detail page. Example: /cars/ List all cars /cars/abc/ ...
0
votes
2answers
121 views

Admin: Navigation Menus do not show empty categories/taxonomies in the list's search tab

This is referring to the Admin area of Navigation menus It seems the normal behavior for building out Navigation Menus (Appearance>menus) is that when you expose categories or custom taxonomies, that ...
0
votes
0answers
71 views

Theme for a specific subcategory inside multiple categories

In relation with this topic in which I wanted a different theme for categories than for subcategories, now one step further, I want a specific theme for a specific subcategory used in multiple ...
3
votes
1answer
141 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() { // ...
0
votes
0answers
39 views

Assign default category for custom post

I am trying to assign a default category to the custom type posts I am using. I found some threads related to that, but they don't seem to work. I have this code so far function ...
0
votes
1answer
109 views

Add Image Size for one Media Category Only

add_image_size is great, but if I want to create a swatch size for colors/patterns on my site, I don't need the swatch size for all of my other images. Is there any way to apply image size by media ...
0
votes
2answers
62 views

Theme for subcategories

I am working with categories (cities) and subcategories with the same menu (for example: cars, animals, houses). Therefore right now my categories structure looks like this: - London -- cars -- ...
2
votes
1answer
275 views

get_terms name__like list categories according to letter

My categories are basically authors, and I would like to create a function to list them according to their surname. For example I'd like to have something like: E: Heinz Erhardt Albert Einstein ...
-1
votes
1answer
168 views

loop mix my child-category and parent-category

i explain the situatio I'm having: I have a blog, which on the homepage, have display the most recent post. For each post category, I have set up one specific color and icon by css. ex: for ...
1
vote
1answer
137 views

Custom post type taxonomy template

I've created a custom post type portfolio and a taxonomy of course. function taxonomies_portfolio() { $labels = array( 'name' => _x( 'Portfolio categories', 'taxonomy ...
0
votes
1answer
122 views

Organizing The Custom Post Type with Taxonomies / Parent Posts

I am trying to make a custom post type called 'Songs'. It will have only two fields being 'Title' & 'Audio File'. I would also be creating a tag taxonomy field called 'Genres' so that admin can ...
1
vote
1answer
52 views

Random post category URL

I'm trying to get a random post URL, only in current category. This is my code, this returns the URL category, :/ <?php $current_cat = get_the_category(); $randomPost = $wpdb->get_var(" ...
2
votes
1answer
117 views

Categories' hierarchy in URL

The posts in the website I'm currently working on have multiple hierarchical categories applied to each of them. For instance: Source - Books -- Moby Dick -- Sherlock Holmes The permalinks are set ...
0
votes
0answers
106 views

Next/Prev category post in same button

i like to put a navigation link in my posts, can you help me? How can do this? http://prntscr.com/64ksjd I've this code but, it show 2 hiperlinks, i want 1 hyperlink: $post_id = $post->ID; ...
0
votes
1answer
106 views

WordPress - List Sub Categories and Sub-Sub Categories, With Posts

I have the following code. It allows me to show sub categories and documents within them. The thing is, a sub category may contain further sub categories. The code below will show documents belonging ...
0
votes
0answers
142 views

Display only children category, then if else, only parents category in a loop

I explain the situation: I have a blog, which has lot of post, some are assign to only some parents category, some only to childrens category, some to both. I'm looking to achieve the following: ...
0
votes
0answers
113 views

Category-Slug.php custom template - no output!

I simply want to output two different categories on two separate pages. I need the two categories to form two rss feeds to Mailchimp, which is fine. I've created two category-categoryname.php files ...
0
votes
0answers
34 views

How to print search results related categories hierarchical?

I'm trying to print search results related categories hierarchical in sidebar area. I did that but my code prints just terms without their parents. Here is my page. I want to print the terms like ...
0
votes
1answer
109 views

Hide a category of posts from main blog, and only show in category view

I would like to hide a post on the main blog page (run on index.php) and have it only show up when the visitor views a particular category. I have tried the following just before the loop: <?php ...
0
votes
0answers
17 views

I changed Category label of category taxonomy on main page… What about paths when choosing a category?

I am using a free wordpress template where I changed the label of Category taxonomy on the left side of the page from "Categories" to "States" (using wp-includes/default-widgets.php). Then, I ...
0
votes
1answer
157 views

Display category title and three latest post inside the category

I am looking for something very similar to this question. However, the answer provided there seems strange to me. I don't know what the arguments posts_per_page=-1 and it seems more like a hack to me ...
0
votes
1answer
88 views

Only list category if it has a custom field image

i've a problem showin a list categories. $args = array( 'orderby' => 'name', 'order' => 'ASC' ); $categories = get_categories($args); foreach($categories as ...
0
votes
0answers
54 views

portfolio by category -> sub-category

I have a portfolio page and I wanted to display the items by category->sub-category. At the moment they are displaying in alphabetical order irrespective of parent-cat sub-cat. I have this in the ...
0
votes
1answer
48 views

ACF no print data [closed]

I've a problem with Advanced Custom Fields Plugin I create a custom field named: bgcolor I want to print the value in category.php, this is my code: $color = get_field('bgcolor', ...
-1
votes
1answer
108 views

How to restrict the amount of categories/post tags/terms for a post type post

I'm in need of a solution that allows me to restrict the user/author to only use maximum of two categories per new post. One post can only have one or two categories. The only similar solution that ...
0
votes
1answer
47 views

How to remove specific categories from tag archives?

I need tag archives don't display specific categories. Thanks!
0
votes
0answers
28 views

Permalinks for categories…making sure that you get the right link in a Category Archive

I recently completely a site with a lot of categories and sub-categories. And in many cases, a post might go in multiple categories. Of course, I know how to do that by simply checking off multiple ...
0
votes
1answer
169 views

WP_Query - using category__and when one of the categories is 0

I am passing a variable $category to category__and, and it works unless $category = 0; 'category__and' => array(4) // works 'category__and' => array($category, 4) // works if category > 1 ...
0
votes
0answers
22 views

Add a Tag to each Post in a Category

I have large number of posts in a certain category. I wanted to add a tag to each post in that category. Here is the procedure to try but not work. Create the new tag. Get the new tag’s ...
0
votes
0answers
39 views

List post categories that link to a page showing those posts

I have posts with different categories. I have a blog page that lists the posts like this. <?php $blog_args = array( 'post_type' => 'post', ...
0
votes
0answers
27 views

Separate blog archives by category

I have two categories for the blog posts on my site, lets call them A and B. I want to add an archive widget (by month) to the right sidebar that only uses category A posts and only shows category A ...
0
votes
1answer
65 views

More efficient way to list posts by category [duplicate]

I have a page that lists posts grouped by category. Here is the current code: <?php $cats = get_terms('category'); foreach ($cats as $cat) { $cat_id= $cat->term_id; echo ...
0
votes
0answers
16 views

WordPress category pagniation not working

I am trying to add pagination to category the URL comes out in the format as /category/cross-stitch/page/2/ but nothing shows on the page its going to 404. My code is below, which works for pagniation ...
0
votes
0answers
24 views

Category slugs being appended “category”

I presume this is because the slug already exists elsewhere e.g. I have a page called /solutions/customer-experience and I want the category slug customer-experience, I try to enter it but it gets ...
0
votes
0answers
83 views

How To Get WordPress Categories Last Update Date?

I am trying to make a custom sitemap for my WordPress blogs categories. For that I added the below code in my functions.php file and save it. Now all things is working fine but I want to get the date ...
0
votes
1answer
129 views

Display 2nd category, only once, as sub-heading, in the loop

I have a Custom Post Type ("Rental"). I am using the code from this article I found to display Rental custom posts on a page, with the Categories of a custom Taxonomy ("Region") as headings between ...
1
vote
1answer
57 views

How To Get WordPress Categories Link List?

I am trying to make a custom sitemap for my WordPress blogs categories. For that I added the below code in my functions.php file and when I save it, my Blog goes white. Nothing is showing up. I ...
0
votes
1answer
73 views

Related content based on category name

I'd like to modify the code below so it grabs the data based on the category the post is in and 'only' that category, not children categories, not other categories, only the category of the current ...
0
votes
1answer
306 views

Show div only if post is in specific category

In my list of blog posts, I would like to show a div which labels the post as a "Press Release" if the post is tagged with the "Press" category. I have added the following chunk into my loop: ...