Tagged Questions
0
votes
2answers
19 views
Exclude 2 in 3 terms of A Taxonomy from all Archives
I have read this post:
Include and Exclude Taxonomies From Archives & Feeds Using 'pre_get_posts'
And then I have used that function to my theme.
My Taxonomy (tinh-trang) had 3 term: ...
0
votes
2answers
40 views
Get used terms by an author as array of strings
I am using list_author_used_terms function below to get the terms used by a specific author (terms of a custom taxonomy 'wossom' for a custom post type 'aya-bi-aya').
function ...
0
votes
0answers
11 views
How to include child terms within parent?
I have the following for a specific term ID:
<?php if (!is_tax( 'listing_category', '542' )) { ?>
test1
<?php else: ?>
test2
<?php } else { ?>
This works great for making ...
0
votes
1answer
25 views
Get the terms of a custom taxonomy for a specific author in author template
I am using a custom post type in my website and a custom taxonomy for it.
An author selects one or many terms before publishsing its post.
My goal is to display authors pages in front end, so I ...
0
votes
2answers
48 views
why the archive of custom taxonomy term shows nothing?
I have a custom post type for which I have created a custom taxonomy called 'tag'. taxonomy-tag.php file looks like this:
<?php get_header(); ?>
<?php $term = get_term_by( 'slug', ...
0
votes
1answer
19 views
Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected
I have posts of custom taxonomy called Areas with terms such as Articles, Presentations, News etc. These terms are applied to the normal post-type "post".
Under a custom-post-type called "Company", I ...
0
votes
1answer
34 views
Add the custom post term to the custom post title
what I need is this: add a term from a custom post to the post's title. Like this: Custom Post title - term
Right now I have:
$terms_of_post = strip_tags (get_the_term_list( $post->ID, ...
0
votes
1answer
13 views
Admin (All posts) stop responding problem
I have situation like this: I have site with 500+ posts, 10+ custom taxonomies, one of taxonomy have 20000+ terms. When in admin panel I go to Posts-> All posts wordpress opens the page but stops ...
1
vote
1answer
26 views
Can't set custom taxonomy terms via custom form
Question
I am creating my first plugin and in it users will be able (among other things) to create new post via custom form from wordpress backend. This post uses custom post type and custom ...
0
votes
1answer
46 views
get_term_link not working
I am trying to use the below code snippet to display an image and then wrap it in a link to a specific term archive page. In this case, I have a custom taxonomy (Series) with a few different terms. ...
0
votes
1answer
87 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
49 views
Changing taxonomy term by slug (wp_update_term)
What I am trying to accomplish is to update a taxonomy term name using its slug rather than the $term_id
Wordpress does this by:
<?php wp_update_term( $term_id, $taxonomy, $args ) ?>
Is it ...
0
votes
1answer
29 views
If post has ANY term attached to it, get the first one only
I am developing a theme that has several custom taxonomy that act as radio buttons.
How do I write a conditional that does...
if(post_has_any_terms($post->id, 'custom-taxonomy')) { echo $term; ...
0
votes
0answers
26 views
Create Pagination in Term list
I need to create numeric pagination in term list.
Is there some options I can do this, i need to create a numeric pagination like the one we have for posts using wp-page-navi.
Here is the code I am ...
1
vote
1answer
83 views
non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue
I registered a non-hierarchical custom taxonomy ('property_features').
There is a checkbox for every terms of this tax in a custom meta box on the edit-screen.
All terms are displayed and all terms ...
0
votes
1answer
27 views
Show all terms in a custom taxonomy with all child terms wrapped in a ul
Is there a way that I can list all the terms within a custom taxonomy in an unordered list and wrap all child terms in another unordered list?
For example;
<ul class="menu">
...
0
votes
0answers
34 views
How to show the term description on single page?
I try to show show the term's description on a single page, but something not works. Same code is working on taxonomy template.
term_description( '', get_query_var( 'collections' ) );
1
vote
2answers
59 views
How to List Parent Term Links for Custom Taxonomy With & Without Children?
I have a Custom Post Type of "projects", that is categorized by a Custom Taxonomy of "industry", which is heirarchical. Projects & sub-projects are assigned to the industries. For Example, the ...
1
vote
0answers
22 views
Ordering taxonomies by rank
I'm using a function (copied and modified a bit from this question ) which displays taxonomies in order by rank with » between parent and child and | between terms, but I get a mistake in the html ...
0
votes
0answers
17 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
72 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() ) : ...
0
votes
0answers
24 views
Group Date Archives by term_id
I am trying to group posts in Yearly date archive page by term:
here is the code I am using :
<?php
$terms = get_terms("publicationcat");
$count = count($terms);
if ( ...
0
votes
1answer
79 views
stdClass::$labels /wp-includes/general-template.php undefined
In my <title> tags I am getting undefined on a custom taxonomy in a custom post type and im struggling to find a way to set it.
<title><br />
<b>Notice</b>: Undefined ...
0
votes
1answer
50 views
Order taxonomy terms wordpress
It seems like something really simple, however I can't find a good solution to what I am looking for.
I created a page template that shows all my taxonomy term of a taxonomy called "news" eg:
paper1, ...
1
vote
0answers
75 views
get_terms not returning any custom taxonomies
I have a custom post type called project with custom taxonomy called tagportfolio
I use this code to generate both:
add_action('init', 'project_custom_init');
/*-- Custom Post Init Begin --*/
...
1
vote
1answer
73 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
280 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 ...
1
vote
1answer
139 views
Getting Term ID from Term Name for WordPress Query
I am trying to get term ids from term name and cannot figure out why this code is not working.
$excludes = '';
if($filtering_excludes) {
$exclude_terms = explode(", ", $filtering_excludes);
...
1
vote
1answer
69 views
Echo custom taxonomy term name
I would like to echo out the term name from a custom taxonomy 'recipes' but all I get is the word "recipe" when it should say eg "pizza recipe". Is name the right argument here or I am mistaking it ...
1
vote
1answer
89 views
How to determine the depth of a term in a custom taxonomy?
I'm building a <select> dropdown to display a list of terms for a custom hierarchical taxonomy. How do I know the depth of each term? I'd like to add some indentation for child-terms (the more ...
0
votes
1answer
100 views
Get post terms with hierarchical relationships
I'm having a hard time getting a set of selected terms in a custom taxonomy presented in a specific way.
I have a hierarchical taxonomy 'places' and a post with the tagged terms:
England (x)
- ...
0
votes
1answer
122 views
Some custom taxonomy child terms not showing in admin. Caching problem?
I have a problem with some custom taxonomy terms. I am using "Types" plugin for creating custom post types and custom taxonomies.
I successfully created my postype and hierarchical taxonomy and ...
0
votes
1answer
99 views
Post to inherit custom category background image from parent
I have a custom field on a category where you can add an image. I have it as a background image to show on the category's archive page, like so:
archives.php
<body style="background:url('<?php ...
0
votes
0answers
63 views
How to pass the term slug to the ajax function as a parameter [closed]
this is the original code of the script
var $mainCat=$('#main_cat').val();
and i replaced it with this
var $mainCat=$('#<how to pass the slug here>').val();
echo '<ul>';
foreach ...
0
votes
1answer
61 views
List related terms + taxonomies
I have a set of main categories for a set of products. All these products has additional taxonomies associated with them.
On a product category page, is there a way I can get all terms in use for ...
2
votes
2answers
206 views
Dropdown: Display terms from B only if has relationship with a term A selected
I've googling for a solution for this issue and found nothing: I have some posts from a Custom Post Type (Restaurants) and its taxonomies ('city' and 'cuisine'). Whenever I create a restaurant post, I ...
2
votes
1answer
193 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?
...
3
votes
1answer
200 views
Retrieving custom taxonomy in order, but excluding specific tax IDs
I have a function set up and working based off the discussion in this thread: Custom taxonomy, get_the_terms, listing in order of parent > child.
My version includes term links and allows me to ...
2
votes
1answer
108 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
17 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
147 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
29 views
Page for custom taxonomy
I'm a newbie in WordPress and I've just created a new custom-taxonomy called categories under a custom post type called arts. Is there a way I can create a custom page to display the 'categories's ...
1
vote
0answers
37 views
How to get a list of taxonomy terms which are being used only within certain post types?
I have a custom taxonomy called 'locations' which is being shared across a bunch of post types. I want to make a select field dropdown list of my locations (terms) to let users go to the taxonomy term ...
1
vote
1answer
81 views
Rewrite rules for varying nested terms of custom taxonomy
I've searched the net an the only working solution to this seems to be this post by Jeff which does everything except handle nested terms.
Does anybody know how to change the rewrite based on the ...
0
votes
1answer
169 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 ...
10
votes
2answers
172 views
Hierarchical taxonomy UI
I don't like the way the taxonomies are displayed within the Wordpress admin and was wondering if anyone knew the best way to hook in and change it. Currently if I select some terms within my post ...
0
votes
2answers
412 views
Adding Multiple Values to a Post Meta Key
I have a question about adding multiple post meta values to a post meta key.
Here is a link to the WordPress add_post_meta(); function in question.
The $unique parameter is a little on the fuzzy ...
0
votes
1answer
345 views
How to get the top most term (top ancestor) of a custom taxonomy child term?
I need to get the topmost term (top level ancestor) of a taxonomy term.
Suppose the following term hierarchy:
North America
United States
New York
New York ...
0
votes
1answer
47 views
Running a function only once when a taxonomy term is changed
Probably quite a simple problem.. I have a custom post type with taxonomy terms. I wish to run a function from my functions.php whenever the admin ticks a specific term box.
My original thought was ...
0
votes
0answers
67 views
How to get the hierarchy position of a taxonomy term? (how many children after / how many ancestors before)
I have a taxonomy "location"
In this taxonomy I list locations, hierarchically, from country to state to city. For example, consider the following terms nested like so:
1. European Union
...
