Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 3966

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.

1
vote
The in_category( $category ) conditional only returns true when the current post has the specified category assigned. If you want to determine when you are on a category archive index page, you should …
answered Feb 20 '13 by Chip Bennett
9
votes
To get the child categories of a given parent category slug, use a combination of get_category_by_slug() and get_categories(). The latter function will return an array of category objects matching … is up to you at that point. EDIT If you need to get child categories of an arbitrary post, then you can use get_the_category(). If you're inside the Loop, simply call get_the_category(); if you're …
answered Oct 20 '11 by Chip Bennett
2
votes
Your problem has nothing at all to do with including a template-part file (for which, by the way, you should be using get_template_part() or locate_template()), and everything to do with Doing It Wron …
answered Oct 26 '11 by Chip Bennett
1
vote
global $wp_query; // Create argument array in which we // exclude desired category IDs. Categories // are listed as a comma-separated string. // e.g. '-3', or '-1,-2,-3' $exclude_cats …
answered Nov 2 '11 by Chip Bennett
0
votes
Add post_class() to the post container div: <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <!-- post markup here --> </div> ...which will give you, among other classes: .category-{ …
answered Nov 26 '13 by Chip Bennett
1
vote
The problem exists because you are using query_posts(), instead of properly filtering the main query via pre_get_posts. Remove your query_posts() call from the template file, then add the following t …
answered Oct 30 '13 by Chip Bennett
3
votes
First, don't use query_posts(). Just get rid of the call entirely. It will break things. Second: I tried adding the following before the query_posts ( function but it does nothing. Callbacks an …
answered Jun 15 '12 by Chip Bennett
1
vote
Your problem is your use of query_posts(). Don't use query_posts(), ever. Filter pre_get_posts instead. For example: function wpse74093_filter_pre_get_posts( $query ) { // First, make sure we ta …
answered Nov 27 '12 by Chip Bennett
1
vote
The problem is almost assuredly your custom loop. I am guessing that this is your problem: $category = get_the_category($post->ID); $category = $category[0]->cat_ID; Further, I'm guessing that the …
answered Aug 28 '12 by Chip Bennett
2
votes
My suspicion is that, for some reason, the name "51m series" or slug 51m-series is (or both are) matching is_category( 51 ). The is_category() function uses the PHP in_array() conditional to match a …
answered Oct 8 '13 by Chip Bennett
3
votes
() { register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'admin_init', 'wpse94150_register_category_taxonomy_for_page_post_type' ); Create Pages with Categories Self-explanatory. For pages to … appear in a category archive index, you'll need to have pages that have categories assigned. Filter Query to include the page post-type for Category archive index pages Next, you need to tell WordPress …
answered Apr 11 '13 by Chip Bennett
1
vote
I have no idea how this was ever working for you to begin with, but there's really no need to use a custom page template for the blog posts index template. WordPress provides a template file to use: h …
answered Nov 19 '13 by Chip Bennett
0
votes
That "Posted On" bit is part of the /inc/meta.php template file, that is being included in archive.php. You can: 1) Modify /inc/meta.php 2) Modify archive.php to remove this include 3) Add a categ …
answered Apr 15 '11 by Chip Bennett
2
votes
I will also add that this is a custom post type, but that shouldn't matter. In fact, this is your problem. By default, the Category Archive Index will only query posts from the post post-type. Y …
answered Apr 6 '14 by Chip Bennett
0
votes
Refer to the Template Hierarchy. You'll need to create a category.php template file, since the category archive index is what gets displayed when clicking a category link in the wp_list_categories() o …
answered Oct 15 '13 by Chip Bennett

15 30 50 per page