Tagged Questions
0
votes
1answer
41 views
Custom Post Types Archives and Single Pages not showing custom taxonomy data
I have a custom post type called "Newsitems" that I have registered two custom taxonomies for: "newsitem types" and "news item tags"
I want these two taxonomies' terms to appear almost like the ...
0
votes
1answer
44 views
Author template - separate custom post type by custom taxonomy term for $curauth
Basically I have a post type called photograph, I then have a Taxonomy group called "Subject" and several tax terms i.e. Abstract, freeze frame etc (Approx 18 in total) under that Taxonomy group.
I ...
1
vote
2answers
60 views
Have a Custom Post Type index page display taxonomy items instead of posts
I have a CPT registered that is called lessons with a custom taxonomy (category) that is called courses. I want the /courses page (archive-courses.php?) to display the individual courses (i.e. "online ...
0
votes
0answers
16 views
getting terms that have the same posts
I have 2 taxonomies, category and state and I've some pages like this:
main-category > child- category > child-category-2 > states.
On the last page I need to list only the state terms that have ...
0
votes
1answer
63 views
How to list posts by term (custom taxonomy)
I created a custom post type (portfolio), with custom taxonomy (portfolio-category).
I created a template, this template lists all "portfolio" posts.
<?php while ( have_posts() ) : ...
2
votes
1answer
51 views
Category page only displaying the posts from a custom type
Situation
I have two cpt:
Projects
Works
In these two CPT I share the same taxonomy 'Category', and the same terms:
Architecture
Landscape
Interior Design
I have URLs like
...
1
vote
1answer
67 views
Show posts from two or more custom taxonomy terms
I want to show posts which are filed 2 or more custom taxonomy terms. For example, I want to show the posts from custom post type "Classified" and filed under Books and House terms.
The code below ...
0
votes
2answers
197 views
Display current taxonomy term when inside custom post type
Well, this should be pretty simple, however I couldn't find answer anywhere on the web. all answers I found were close but no exactly what I needed.
what I need is to display just the current term of ...
0
votes
1answer
396 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 ...
2
votes
1answer
189 views
Get terms that contain posts that in turn belong to other terms?
So I have custom taxonomy called "shape" and another one called "color". If I want to get the list terms under shape that contain posts that are also present in terms under color, how do I do that?
...
2
votes
1answer
103 views
Glossary with Custom Post Type
I´d like to make a glossary. It should looks like:
Index-Nav
0-9 | A B C ... M ... X Y Z
B
BMW
M
Mercedes
...
ALL entries from index-nav (A-Z, O-9) should be visible in a <ul> and should ...
0
votes
0answers
16 views
Getting Parent Term ID [duplicate]
Possible Duplicate:
Get the the top-level parent of a custom taxonomy term
I'm in a hierarchal custom taxonomy and I want to get the root parent term id.
Something like
...
1
vote
1answer
145 views
Listing all term items alphabetically / sorting loop
I have my own custom post type and it has its own taxonomy and terms.
Whenever user visits http://example.com/mytaxonomy/myterm I want the page to display all items within this term alphabetically.
...
0
votes
1answer
140 views
Does WordPress limit the length of slug names for Post Meta or Terms?
The WordPress Codex states the the Post Type Names and Taxonomy Names have a limit to the slug name.
Register Post Type -- max. 20 characters, can not contain
capital letters or spaces
Register ...
1
vote
2answers
90 views
Creating a function that receives the taxonomy terms that have been changed in a custom post type
Ive been looking into actions and hooks etc... from wordpress, but cant seem to do a very simple thing. I just want to execute a function whenever a post is updated, and within the function I want the ...
0
votes
1answer
114 views
Custom taxonomy not saving correctly
I'm using a custom post type and a custom taxonomy to display a list of properties and its type in a page. It's working fine but for some reason some of my posts' taxonomies aren't getting saved ...
0
votes
1answer
132 views
array_pop() expects array, boolean given for $event_type_term ->slug
I have the following function I wrote …
add_filter('post_type_link', 'events_permalink_structure', 10, 4);
function events_permalink_structure($post_link, $post, $leavename, $sample) {
if ( ...
0
votes
1answer
320 views
Custom Post Type Archive Template
I have similar problem to this one: Custom Post Type Template - Archive
So, I have a wordpress custom post type called coupon. I try to assing the template to it by using archive-coupon.php, but it ...
1
vote
1answer
1k views
If on term-page -> get the current term?
I'm trying to write a kind of "breadcrumb" function in my "functions.php"
I'd like to query if I'm on a term-page and if so I want to print the current term I'm in.
By "term-page" I mean the ...
2
votes
1answer
6k views
Get Posts by Custom Post Type ,Taxonomy, and Term
Ok, so i have a Custom Post Type called "Services". This custom post type has a taxonomy called "Areas" and there's 5 terms in that taxonomy.
Let's say I have 10 posts on "Services" and there's 5 ...
0
votes
3answers
450 views
How to get WordPress term attached to the Post?
How to retrieve all WordPress terms attached to the Post and Other Post type?
Assumed I don't know/don't care about the taxonomy, term name/term id etc, the only thing I know is post_id.
Thank you.
1
vote
1answer
130 views
Which post does a taxonomy term belongs to?
I’m having a page which displays all custom taxonomy terms for a particular type which I get from the URL. I use this code to retrieve all the terms:
$args = array(
'post_type' => ...
0
votes
1answer
241 views
Shared terms between taxonomies
Need some help from you.
It's a matter of classification.
Here is the deal:
I've got a custom post type about movies and I set up some custom taxonomies (non hierarchical, so acting like tags) for ...
0
votes
1answer
216 views
Taxonomy terms with the same name are updated between separate custom post types
I have 3 custom post types, and they each have a taxonomy labelled location, with some term names shared between them. The problem is, if I update a term name in any of the 3 custom post types, it ...
0
votes
1answer
65 views
Query for specific taxonomy that executes a particular loop depending on volume of posts?
Is it possible to create a special wp query that looks to see how many posts exist in a specific taxonomy, or taxonomy term, and executes a particular loop depending on the volume of posts?
My idea ...
1
vote
1answer
773 views
List taxonomy terms for post as checkboxes
I'm modifying the plugin Wordpress Frontend User for my custom post type(s). What I need to edit is the custom taxonomy terms. In order to do this, I need to list my terms as labels and have ...
0
votes
1answer
351 views
List custom taxonomy terms
I am trying to display all of the terms for a custom taxonomy(characters), the taxonomy is related to a custom post type(books).
What I would like to do is display all of the terms for characters, so ...
3
votes
2answers
366 views
Copy a Taxonomy Term into the Post Title for a certain Custom Post Type
I am using Gravity Forms to allow users to create posts from the front end.
However, the way this site I am building is going to work, one specific Post_Type is essentially just a "Data" post. There ...
0
votes
1answer
793 views
show 10 most recent custom post types excluding the one(s) from specific custom taxonomy
After spending most of the day looking for solutions and trying them out, I decided to explain my problem here.
I am aware that this subject has been covered and as you will see I am using code that ...
2
votes
1answer
169 views
post count is wrong when using same taxonomy for 2 different CPT
1 custom taxonomy registered for 2 different CPT (custom post type). When i entered to edit tag section on edit-tags.php?taxonomy=mytaxonomy&post_type=cpt1 it displays total post count of 2 ...
2
votes
1answer
394 views
How to hook get_terms() to only show count of posts that have custom meta
Here is what I have:
A custom post type that has a custom meta value added to a post that stores the posts expiry date. When the post passes this expiry date it no longer shows on the site.
This ...
0
votes
1answer
459 views
Showing posts by collection of specific terms and texonomy
i have a custom post type name 'business' and taxonomy 'business-category'. now i want to show posts for some specific terms suppost, term1, term2, term3 etc. The following code is working for me but ...
6
votes
6answers
7k views
Get terms by taxonomy AND post_type
I have 2 custom post types 'bookmarks' and 'snippets' and a shared taxonomy 'tag'. I can generate a list of all terms in the taxonomy with get_terms(), but I can't figure out how to limit the list to ...
2
votes
1answer
1k views
How to get the first term for the current taxonomy?
I'm using the following code to display the term for a specified taxonomy:
$terms = get_terms( "book_review" );
$category = $terms[0]->name;
However I want to display the term for whatever the ...
0
votes
3answers
3k views
Retrieve single term slug
I'm creating common "Single Tag Page" for different Post Types.
I'm using next code:
$loop = new WP_Query( array( 'post_type' => 'any', 'tag' => single_term_title( '', false ), 'posts_per_page' ...
0
votes
1answer
802 views
Get_the_terms restrict output
I have a custom post type Holiday associated with a taxonomy Country.
On my single-holiday.php, I use the taxonomy to display in the title.
For example
Holiday in Spain (Spain being the tax)
Rarely, ...
0
votes
2answers
416 views
Query posts with double taxonomy
So I have a custom type called "vendors" and two custom taxonomies for it. One is "state" and the other is "type".
I am trying to list all the vendors from a certain state on one page. I'm using the ...