Linked Questions

11 votes
2 answers
150k views

Wordpress get_posts by category

I have the following bit of code: $args = array( 'posts_per_page' => -1, 'category' => 7, 'orderby' => 'name', 'order' => 'ASC', '...
Michiel Standaert's user avatar
8 votes
4 answers
86k views

Get taxonomy names by post id

I'm trying to create a single page where I display a few posts on one page. So far so good. Works all fine. Now I display posts in a foreach loop where I check if they are connnected to the page. ...
caramba's user avatar
  • 1,416
4 votes
2 answers
65k views

WP_Query by Category Name

Hi I am using some code to display posts in a slider on a page, and at the top I have some code to filter it using WP_Query. Here it is, not sure what is wrong: <?php /** * Featured Content 2 * ...
user6311172's user avatar
4 votes
1 answer
2k views

expire wordpress user posts

I'm trying to make classified WordPress theme and I need to make users posts expire date plus show that date into the post. Users only allowed to publish their posts in post-types not as ordinary ...
Scott Wolter's user avatar
3 votes
1 answer
14k views

category__in not working on custom post type

Can't get my WP_Query loop to work, cannot figure out why category__in won't work. Just want to pull certain categories FROM my custom post type $args = array( 'post_type' => 'bbt', '...
rand_user91's user avatar
3 votes
1 answer
6k views

What are terms and taxonomy, how they related to post and how these three are stored in database?

I want to understand terms and taxonomy in WordPress. My questions: What are the terms and taxonomy in wordpress? How terms and taxonomy relates to post and how post, terms, taxonomy are stored in ...
Trupti's user avatar
  • 31
3 votes
1 answer
925 views

Conditional tag for all categories of a custom post type

I need a conditional tag which returns true on all categories added to a specific custom post type. Tried dozens of variations using the conditional tags from the Codex but still stuck. What i'm ...
Brad Dalton's user avatar
  • 6,937
2 votes
1 answer
605 views

Does WordPress Offer a Way to Find All of the Categories that Don't Have Children?

Background As discussed in Is There a Difference Between Taxonomies and Categories, taxonomies refer to a generalized system of classification and organization of objects or data. In the case of ...
gate_engineer's user avatar
2 votes
1 answer
4k views

Displaying all Video Post Formats to Page

I am creating a video-archive page for all the posts_format with video. Currently, I have: <?php $format = has_post_format('video', $post_id); ?> <?php if($layout != "fullwidth") { ...
Travis Patron's user avatar
2 votes
3 answers
2k views

Taxonomy archive template to have conditional logic for displaying child categories

I have a custom post-type "downloads", and within the downloads menu, I have download categories, the taxonomy name is "downloadcats". My Downloads page uses a page template that lists all categories ...
Adrian's user avatar
  • 354
1 vote
2 answers
255 views

All posts are still shown when adding category argument to query

I've got the following code in my team-type.php file which I'm using to create a custom taxonomy for a member information: function create_team_taxonomies() { $labels = array( 'name' ...
Laniakea's user avatar
  • 503
1 vote
1 answer
8k views

Retrieve Image from Media Library by it's category

What I am needing to do here is get an image from the media library only by it's category. It won't be attached to a post, meaning that, the image will not be uploaded as a "featured image" of any ...
Samuel Hadsall's user avatar
1 vote
2 answers
1k views

How to show WordPress parent and child category using a different template?

I am currently trying to do a directory style site, and I currently have parent categories and child categories. Right now, I have the parent categories showing and when a parent category link is ...
Arif's user avatar
  • 21
1 vote
0 answers
74 views

What is actually taxonomy in wordpress? [duplicate]

What is actually taxonomy in wordpress? How and where exactly I can use taxonomy. I have read many google search about it but need someone to just explain in little simple language.
Helping Hands's user avatar
1 vote
1 answer
1k views

Get posts from specific taxonomy term

I have nhl news website and I have taxonomy for each season (ex 2014-15) Taxonomy in functions: function wptp_register_taxonomy() { register_taxonomy( 'season', 'post', array( ...
LinekereDe's user avatar

15 30 50 per page