Linked Questions

0 votes
1 answer
1k views

WP Query - filtering terms with regex

is there a possibility of filtering posts by terms using regexp? My code doesn't quite seem to work. $tax[] = [ 'taxonomy' => 'tax_name', 'field' => 'name', 'terms' => $...
Pavel Koch's user avatar
0 votes
1 answer
2k views

How does the 'the_post_navigation()' work for CPT's?

In the twentyfifteen theme on the single.php template they are using the fairly new function 'the_post_navigation'. It seems to work for Custom Post Types (CPTs) but I cannot figure out how it does ...
Benjamin's user avatar
  • 175
0 votes
1 answer
243 views

Also show terms that are related to draft and pending posts

Im using wp_dropdown_categories to output terms in dropdown menu but it only shows terms that are related to published posts. I wonder if there's a way / hack to include terms that are related to ...
N00b's user avatar
  • 2,159
0 votes
1 answer
570 views

Related Posts Excluding Certain Categories

I'm using a related posts PHP WordPress query, but having trouble excluding categories. I've tried excluding via cat and category__not_in as well as both as and not as an array. What am I setting up ...
Keefer's user avatar
  • 316
0 votes
0 answers
58 views

Category archives

According to the WordPress docs, to show a Category archive you simply need to create a file with the right file name i.e. category-slug.php category-ID.php category.php archive.php However what I'...
Snowcrash's user avatar
  • 317
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
11 votes
2 answers
143k 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
0 votes
2 answers
819 views

Widget logic conditional widget

Is there any experience using widget logic, I want to display a widget on single custom post type with specific taxonomy. Tried using is_tax(taxonomy_name) || is_single() && in_term(...
da_root's user avatar
  • 150
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
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
0 votes
1 answer
546 views

Custom term templates

So, I did some research online but could not find a solid answer, so here I am. I am in need to make a custom woocommerce category page for a specific category. For example, I have a category called ...
Steve Kim's user avatar
  • 365
0 votes
1 answer
58 views

In what context should Categories and Tags be used

I was thinking on writing up a post called "Review: Ni no Kuni" which would be a personal review on the title game having finished it. Under categories i could make a "Reviews" Category to group all ...
Memor-X's user avatar
  • 143
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
0 votes
1 answer
12k views

Category Template for Custom Post Type

I'm driving myself crazy with the following issue, hope you can help me! I'm working on a WordPress theme for a business directory so I decided to make some custom posts types on functions.php file ...
active-worker's user avatar
0 votes
1 answer
38 views

Custom Taxonomy Query by Taxonomny not working

Not sure what's going on - here's a look at my code: $args = array( 'orderby' => 'title', 'show_posts' => '-1', 'posts_per_page' => '-1', 'cat' => $goalsCat->cat_ID, ...
Jason Herndon's user avatar

15 30 50 per page