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
votes
1answer
21 views

Are custom posts included when getting a categories' posts?

Would WP_Query('cat=1') display custom post types, or is that something that I have to specify? I have a custom post type, am assigning it to a category, and would like for it to be displayed when ...
0
votes
1answer
86 views

Display deepest post category, when post have multiple categories

I want to display the direct category ancestor of a given post. An illustrative example: These are the categories I have: Cat1 Cat2 Cat2.1 Cat2.1.1 Cat2.1.2 Cat2.2 Cat2.2.1 ...
0
votes
2answers
46 views

How can I tell what category I'm in— in the header?

How can I identify what category the current page is showing in the <head>? Here's the code I have now: <?php if ( is_home() ) { ?> <!-- set up for home page ad --> <?php } ...
0
votes
2answers
2k views

SQL query to get posts from multiple categories but not in a category

I need to get the last posts' ID and the post_tile within categories 1 and 2, and exclude those within category 3. It must be SQL, because if I use WP_Query it retrieves too much info and I only need ...
0
votes
2answers
2k views

Pagination on category.php and tag.php not working

i'm using a query-loop on my template pages like this: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query = new WP_Query(); ...
0
votes
1answer
1k views

Display Related Posts by Category in Random

I use one of smthemes and there is this code in theme to show related post. it shows the last created related posts, but I want to show related post by random, How can I do that? global $SMTheme; if ...
0
votes
1answer
191 views

WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1

I have two categories that will always stay the same. They are called "Events" and "Show on frontpage". The latter is a child category to Events. What i want to do is, when fetching posts (using ...
1
vote
4answers
707 views

Different background-image by category

I am trying to put different body background-image for each category. body { background-color: #000; background-image: url(img/bg.png); background-repeat: no-repeat; background-position: center ...
1
vote
1answer
17k views

List all custom post type posts from a given category?

I have a custom post type myposttype and it's taxonomy is called myposttype_categories. myposttype_categories have multiple terms inside, such as foo and bar. The tricky question is - how do I list ...
1
vote
0answers
579 views

Refine/Filter the Search Results by Category

I am currently creating the process of a function which allows one to refine results, Namely by category. Similar to themeforest.net refine the search results. When i gave as search term "Hello" and ...
0
votes
1answer
2k views

Allow user to set custom order to a list of custom taxonomies?

I have a custom category checkbox on each individual bio attorney page that shows what practice areas these attorneys are involved in. Currently I have them sorting alphabetically. I am wondering if ...
0
votes
1answer
149 views

Is it possible to have different header style blog titles in different categories?

For my category titled 'mindset' I would like to use the following style on my post header: background: none repeat scroll 0 0 grey; border-bottom: 5px solid #83990A; However for my 'news' category ...
0
votes
1answer
3k views

Paginate WordPress Category Pages

I am using the following query on my category.php template: <?php $paged = (get_query_var("paged")) ? get_query_var("paged") : 1; query_posts("posts_per_page=2&paged=".$paged); ?> ...
0
votes
2answers
386 views

Can each user have only access to a private area (his own categories and posts)?

I am working on a wordpress site and one of the key features i want to have is the fact that each user, once registered should be able to : create his own categories (that will be visible only by ...
0
votes
1answer
28 views

inserting a category into post

Can you tell me how can I insert a whole category into the specific post. for example: have 4 posts in a category "zanimljivosti" and I want to put that category to be shown inside another post not as ...
0
votes
1answer
2k views

Setting selected term_id with wp_dropdown_categories?

I'm using this code to get the term_id of a custom taxonomy. The drop down does list the terms of the taxonomy Type. When I print the $terms variable I see the term ID of the post i'm editing on the ...
0
votes
1answer
310 views

Filter categories/tags to display in multiple metaboxes for selection in back-end

My site uses a lot of categories and tags for author selection in the back-end. To make it more user friendly for authors I need to arrange the categories and post tags in numerous metaboxes for ...
-1
votes
1answer
1k views

How to add a post without assigning to a category?

Can any one please explain how to add a post in WordPress without assigning it to any category. Actually I want to display some news or some quick information. So, it does not come to any category ...
0
votes
1answer
234 views

Get a list of post titles and links from yootheme master theme

Hi I am using the yootheme master collection and I wish to get a list of 10 permalinks from this custom post catagory but at the moment I can only get 1 to show. How do I do this properly? Cheers ...
0
votes
1answer
66 views

Older entries link within a category page

I have set up a category called 'blog' and have all of my posts displaying from this category. I have selected to display 4 posts / page therefore there is a link at the bottom that says older ...
0
votes
1answer
100 views

Problem with single posts not showing correct category sidebar

I'm looking for something very specific: I'm using a plugin called "Category and Tag Specific Widgets" to create category-specific html in the sidebar of each category. This only works if I click on ...
0
votes
1answer
104 views

single.php fires more than once after clicking on any post to view with different post id each time

I am now experiencing a wired problem with my wordpress installation. I was surprised when I saw post view counter of another post also increased including the the post on which I clicked to try and ...
0
votes
1answer
3k views

How do I show child categories if in a parent category, and posts if in a child?

I was hoping to do all of this within the category.php template, with help from the functions.php if needed. If my setup is: Parent 1 --Child 1 --Child 2 Parent 2 --Child 3 --Child 4 Parent 3 ...
1
vote
1answer
1k views

Add custom field to all posts in specific category

I want to bulk add a custom field (category) with value (photography) to all posts in a specific category (photography, with Category ID 5). I have used the code below to bulk add a custom field to ...
0
votes
1answer
1k views

get_category_parents for custom post type taxonomy

I know that we can get the parent category in normal post type by: get_category_parents($cat, TRUE, ' &raquo; '); But how can we get the parent category in custom post type? I use this for: ...
0
votes
1answer
91 views

Display the first post's comments of category in comments.php template

I want the display the comments from first post of the category only. Example; Category - Post 1 (2 comments) - Post 2 (1 comments) - Post 3 (5 comments) If I am reading the Post 2 or Post 3, I ...
1
vote
2answers
7k views

How to get the number of posts in a selected category?

I would like to show the number of posts on the category page. How is it possible? I tried to find a solution but no luck.. Thank you!
0
votes
2answers
117 views

How to insert category list into post creation page, and retrieve chosen categories?

I would like to display the full list of categories on the Page creation page, so that the user can pick using checkboxes which category posts should appear on that page. I then need to retrieve ...
1
vote
0answers
104 views

How to make the link to the category for a post go to corresponding page number in archive?

For instance, I am at http://url.com/single-post and in the post there is a link to the category that navigates to http://url.com/category/page/3/ which is the corresponding archive page that contains ...
4
votes
2answers
223 views

Rearranging posts based on categories

Hey everyone on Stackexchange! I'm trying to find a way to prioritize posts based on a category in a loop, which is sorted by dates. All posts are grouped under their respective dates. The date ...
0
votes
2answers
268 views

Multiple Categories under one URL, where 'Front Page' is used already

I couldn't find an answer relating to this, maybe I just didn't come across it yet. So the setup of the site I am working on at the moment: The Front Page is not set, is default. I can't change this ...
1
vote
2answers
2k views

Including categories in search results

I am trying to include categories in search results. I've been searching for hours now with no solution. By "including categories" I don't mean search in a certain category, I mean let's say I have a ...
0
votes
1answer
52 views

finding out the top 5 source ( source is a custom taxonomy ), in a given category

The client I'm working with have thousands of articles and media ( audio/video ) files. To WordPress, all are posted by Author ID 1, which we named as STAFF. All the content though in reality has ...
1
vote
1answer
973 views

How to filter posts that belong to a specific category only if that is the only category

I need to filter posts that belong to a category only if that is the only category. For example if my post A belongs to cat1 and I don't want to display posts that belong to cat1, post A won't be ...
0
votes
1answer
54 views

Need help with category page customization meeting certain condition

I have 3 columns in my category page. On the left column, I want to show Recent posts only from that category I am viewing. In the middle column I want to show most viewed post only from that category ...
0
votes
1answer
76 views

Listing category

This is the code I'm using for listing categories: <?php $this_category = get_queried_object(); $args = array( 'orderby' => 'id', 'show_count' ...
2
votes
1answer
4k views

WP Query group/order by category name

I have a requirement for displaying a list of custom post types grouped by category, but in addition to this, each custom post is linked with a meta value (in this example lets say we have a custom ...
0
votes
1answer
793 views

new WP_Query all post in a category inside the loop

Im trying to get a list of post in a category with this: $category = get_the_category(); $args = array( 'post_type' => array('post', 'entrevista'), 'cat' ...
-1
votes
1answer
103 views

Trying to WP_Query a category

I am trying to output all the posts of a certain category but all that is happening is The page content is being outputted no posts? template page <?php /* Template Name: Blog */ ?> <?php ...
2
votes
1answer
61 views

How can I get an <h2> tag to wrap each ancestor that gets outputted in this condition?

I found this snippet in a different thread and it mostly does what I need, but I'm having trouble wrapping the individual pages this outputs with tags. All I can seem to add is a line break. I don't ...
0
votes
1answer
53 views

How can I add the custom taxonomy categories to the posts and pages?

I'm trying to build new wordpress plugin. Additional to the default wordpress categories box in the publishing screen of posts and pages, I want to add another box for custom taxonomy categories , How ...
2
votes
1answer
118 views

How can I list random authors from current post category?

The following lists authors of the current category. But I want this to be a list of 6 random authors from current post category. foreach((get_the_category()) as $category) { $postcat= ...
0
votes
2answers
2k views

Custom post type, taxonomy and admin bar

I have two kind of post types in my WordPress website: "Articles" which is the classic post type "Breves" which is a custom post type I want them to share the same standard categories and post ...
2
votes
1answer
198 views

New categories are now going to 404s

I have a WPMU site with hundreds of blogs on it. We are on 3.4.2 and this is the first time I'm seeing this issue within a few of my sites. Basically, what happens is that I'll create a new category ...
2
votes
1answer
99 views

How to prevent empty category to list content of sub categories?

I have a category structure like following: A ->B ->C D (B is sub category of A and C is sub category of B) I have content only for category "C" and if I open Category "B" the content of ...
0
votes
2answers
269 views

Getting posts from some categories plus some individual posts

I want to display list of all posts under a couple of categories and some individual posts. If I use the following code, it does not return anything, as it looks for those individual posts in the ...
4
votes
2answers
4k views

Remove / Rename Uncategorized Category In Wordpress

I have installed wordpress Muilit Site (NETWORK) I need to Remove / Rename Uncategorized Category In Wordpress. How is this possible?
0
votes
1answer
76 views

Trying to get variables in hacked category dropdown

I've discovered a workaround to get wp_category_dropdown to display as a multiple select field. My code is as follows: <?php $sponsors = wp_dropdown_categories( array( 'child_of' => 0, ...
0
votes
2answers
177 views

How can i call from custom fields to the category editor?

I found this code for custom field add category editor. I added custom field to the Category. e.g. My field name is Hastag and i have a Sport category. And i want to call display Sport's custom ...
0
votes
1answer
521 views

How can i list random post from multiple category?

I have an author page, and I want to list posts from current author's categories. e.g. I'm viewing John's page, and John wrote in Sport, Tech, News, Computer categories. Then my code list from this ...