Linked Questions
31 questions linked to/from Is There a Difference Between Taxonomies and Categories?
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',
'...
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.
...
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
*
...
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 ...
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',
'...
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 ...
3
votes
1
answer
923
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 ...
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 ...
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") {
...
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 ...
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' ...
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 ...
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 ...
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.
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(
...
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 ...
0
votes
1
answer
2k
views
Make a vertical dynamic list of posts in alphabetically order and in columns [closed]
I have a page that lists all the posts from a given category of an custom post type dynamically. I do this with a plugin that list posts and a shortcod and with css i created 9 columns where they are ...
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' => $...
0
votes
1
answer
249
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 ...
0
votes
1
answer
575
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 ...
0
votes
1
answer
560
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 ...
0
votes
1
answer
61
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 ...
0
votes
2
answers
784
views
Post archive for certain post format
I am using the following code for a custom archive of all posts:
$taxonomy = 'category';
$param_type = 'category__in';
$term_args = array(
'orderby' => 'slug',
'order' => 'ASC'
);
$...
0
votes
1
answer
6k
views
Breadcrumb not showing custom category post type
I have an issue when it come to displaying the custom post type category in my breadcrumb menu on the page it looks something like the following
Home / / Post Title
when it should be
Home / Custom ...
0
votes
1
answer
3k
views
Getting custom taxonomy posts on archive page
Hi I am not sure if the question is understandable or not but what I am trying to achieve I will explain. I have a custom post type called menu item and custom taxonomy called menu item type.
CODE
...
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'...
0
votes
2
answers
826
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(...
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 ...
0
votes
1
answer
40
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,
...
0
votes
2
answers
2k
views
Adding a button to a product if it's in a category, then linking to that category
I've got a site with products... and some of those products are in categories (collections). For those products I want to show a button 'view the collection,' and have that link to the category.
So, ...