In WordPress, terms are itens set to a taxonomy, i.e. when you create new categories or tags you create new terms.
0
votes
0answers
17 views
link generated term list to latest post of term
i use the following code to generate a unordered list of all terms within a taxonomy and a nested list with all posts of the terms direct under the lsit item of the term
<ul ...
0
votes
2answers
37 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
24 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
47 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
18 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
15 views
Why is my WP_Query not working when tax_query terms are an array?
I have an issue with a WP_Query for a site I'm building which has me stumped.
This works as expected:
$package_args = array(
'post_type' ...
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
votes
0answers
20 views
Arbor.js to show custom terms [closed]
I'm trying to use the arbor.js (http://arborjs.org/) to display custom term taxonomies in wordpress but it's a complicated plugin to setup (at least in my jquery level). Has anyone did something like ...
0
votes
1answer
16 views
Automatically Assign Parent Terms When A Child Term is Selected
I have deep hierarchical taxonomy and I want to have all parent term assigned when I select a child term. I need it for category structure on a online listing/classified site.
CPT name: product
...
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
70 views
input radio 'checked' saves, but select option 'selected' doesn't
So I followed a tutorial on how to create a meta box w/ the taxonomy terms shown in radio buttons. (Tutorial here for others if interested: ...
0
votes
0answers
16 views
Delete Term via edit-tags.php
I might get rep'ed down on this - but is there suppose to be a "Delete" link on the edit-tags.php page? Note: not the WP-List-Table, but the actual page where you specifically view the terms ...
1
vote
1answer
35 views
Handling duplicates with wp_insert_term()
I'm using wp_insert_term which works quite well
Now I want some error handler for when using the same name.
$term_id = wp_insert_term( $term, 'wpsc_product_category', $args );
if($term_id) {//my ...
0
votes
1answer
45 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
2answers
38 views
Add text to the end of each list item in wp_list_categories
I haven't been able to find what I'm looking for and not sure how to approach it.
I'm using wp_list_categories to obviously list terms of a taxonomy. I'd like to add some text to the end of each ...
0
votes
1answer
28 views
How can I get the name of term post meta value which equals term id
I have a custom taxonomy (location) that is being populated automatically by an advanced custom field on user save. The issue is that it saves the term_id in the postmeta meta_value field. When I echo ...
0
votes
1answer
84 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
0answers
33 views
Get posts under a category with SQL
How can I retrieve posts under a category with plain SQL with out using WordPress native api's like get_pages?
My Wordpress table wp_terms contains a term named Restaurants.
I want to list the post ...
0
votes
2answers
88 views
Get post by term from custom taxonomy in another blog on the network?
I'm having trouble getting post by term in a custom taxonomy I have set up. The catch is this is multisite and I'm getting this data from another blog on the network where the taxonomy is registered. ...
0
votes
1answer
47 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 ...
0
votes
1answer
48 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 ...
1
vote
1answer
110 views
How to display posts via custom taxonomy terms using checkboxes?
I would like to have a form with checkboxes. Each checkbox would be a term of my taxonomy "cities". The idea is that if a user select any of the checkboxes, it should show all posts that are NOT in ...
0
votes
1answer
27 views
array_replace throwing php_warning but working anyway
Hello I have a question which is maybe more PHP question than WordPress, but could be interesting in a WordPress context in case someone wants to add properties to an WP object.
I have created a ...
0
votes
1answer
50 views
Return Taxonomy Name for Each Term
I am returning a list of the terms from three different taxonomies.
$terms = get_terms(array("air-categories","web-categories","ink-categories"));
I get the list and I need each to link to a ...
0
votes
0answers
34 views
Get Related Posts (custom post type) of Custom Taxonomy, Most to Least?
I'm working on an image page feature which retrieves the MOST related posts ("image" custom post type). So images with most terms in common should be listed first. But this does not seem to be ...
0
votes
0answers
36 views
query optimization and benchmarking question to fetch term_taxonomy_id for the provided `name` of term
I have been writing a some plugin for which I need to fetch the term_taxonomy_id from the term_taxonomy table of WordPress for the provided term name.
Though I tried to benchmark them but in best and ...
0
votes
0answers
45 views
Custom Taxonomy Terms Pagination Not working
I am trying to create a pagination for terms and not for the pages. Earlier I was successful in it but when I added new terms then the links started giving me 404 error. Here is the code to of the ...
-1
votes
1answer
269 views
Woocommerce getting top level category parent and make all sub categories have the same template and menu
I want to get the top level category parent which is "wedgwood" so i give it a different menu and different template that what i wrote so far but it dont apply except on ‘wedgwood’ category wegdwood ...
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; ...
1
vote
2answers
79 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
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
26 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
58 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
71 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 ( ...
2
votes
1answer
56 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
...
0
votes
1answer
78 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
74 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 --*/
...
0
votes
3answers
100 views
100+ terms in any taxonomy slows down post updates?
I'm making a fairly large (for me) e-commerce shop with Woocommerce. The shop has ±1300 products and will be going to ±2000 products. There are also ±2500 Product Tags.
I've had speed problems on a ...
1
vote
1answer
72 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
275 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);
...
0
votes
1answer
550 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 ...
