In WordPress, terms are itens set to a taxonomy, i.e. when you create new categories or tags you create new terms.
2
votes
1answer
867 views
Generic taxonomy-term template page
because of my taxonomy hierarchy, my taxonomy-type.php template is already used, is there a way to have only one taxonomy-type-term.php template ?
I've got 13 sub terms, do I need to create 13 ...
0
votes
2answers
71 views
How do I print a term list but alter the link text?
I have a long list of taxonomy terms that all look like City-ST-Zip, ie: Phoenix-AZ-85043 or San-Diego-CA-92037
How do I print the list of terms so that the link URL remains intact but the link text ...
0
votes
2answers
304 views
Missing term_id and term_taxonomy_id when adding a term using wp_insert_term() function
Check the line;
list($term_id,$taxonomy_id) = $result
in the code snippet below. ( towards the bottom ).
Why am I missing the term_id & the $taxonomy_id when I echo their values?
Aren't ...
1
vote
2answers
340 views
Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
Simple question, really. I know pretty much nothing about SEO, and i'm trying to define a good structure for this clients online magazine.
I already know i'll be using a few custom taxonomies along ...
0
votes
1answer
769 views
tax_query operator woes
I am trying to filter posts by multiple taxonomies. My code below works great, but their is one thing I can't quite figure out. When I filter the posts it seems that they only show the posts that ...
2
votes
2answers
515 views
Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms
I am importing a large DB from an Excel spreadsheet into a wordpress DB. I was going to do it manually by creating a new table but decided to import it into the existing wordpress framework as it will ...
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
183 views
Order taxonomy terms by the frequency of use in the last 30 days
I would like to know how to order the terms in some taxonomy according to their frequency of use in posts in the last 30 days. What I am looking for is the most optimal method how to add "orderby" ...
0
votes
1answer
117 views
How to create a list of terms who's posts also have a predefined external term?
I have a pretty extensive music collection and my friends are always borrowing my stuff. I would like to keep better track of my library so I'm building a sudo-checkout system using WP.
The ...
0
votes
1answer
42 views
How do I determine if a certain term is in an array?
I am currently running the below wordpress php and it is creating a list for me.
$term = get_term_by( 'id', $ptc, $taxonomy );
echo '<li><a href="'. home_url() .'/taxon/'. $pt->slug .'/' ...
1
vote
0answers
183 views
Why is my 'list_terms_exclusions' filter function timing out? [closed]
Why is my function timing out?
When the issue was first noticed I added wp_defer_term_counting('true') to delay that process but to no avail.
/* Filter category from get_categories and ...
0
votes
1answer
56 views
Retrieve all term IDs of post
I have an array of term IDs that I'd like to filter my query with, but most wordpress functions seem to need the 'taxonomy' field entered too. Is there a reason for this?
Passing the taxonomy ID ...
0
votes
1answer
358 views
Custom taxonomy term as class?
I'm trying to add a class to a container within a query, ideally I'd like to use the terms from a custom taxonomy I have setup (guide-categories).
As an example:
<div class="myclass *taxonomy ...
0
votes
1answer
1k views
Display Child Categories of Current Post ID
I'm starting to love this place more and more, super helpful!
Anyway, todays dilemma is as such:
I want to display as a list the child terms only, of a specific parent term, of a custom taxonomy, ...
0
votes
1answer
47 views
Most allowed Taxonomies in Appearance->Menus
I am managing a large list(300) of "places" taxonomies, and I need to create a menu with those places. the WordPress menu system seems like the way to go but when I save the menu I am getting a PHP ...
0
votes
2answers
212 views
Related terms - Terms that feature in post of current term
Not sure how hard this is but i'll try and explain it as simply as possible.
I have a custom post type called: "Movies" with an taxonomy term called "Actor"
For example purposes suppose were on the ...
1
vote
1answer
399 views
Displaying terms by first letter
I run a book review blog and I have multiple pages that lists the reviews by different things (rating, book title, and author)
I have custom taxonomy for authors and I basically have my code list all ...
0
votes
1answer
137 views
Is it possible to get_terms by author?
I get terms from all my posts with get_terms,
$tags = get_terms( 'mytags', '&number=5&orderby=date&order=desc&hide_empty=1' );
foreach ( $tags as $tag ) {
echo '<a ...
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
428 views
How to insert an array of terms using wp_insert_term?
WP provides a function to insert terms:
<?php wp_insert_term( $term, $taxonomy, $args = array() ); ?>
I have 60 $terms, each has its own $args, I want to prepare the 60 terms as an array, ...
0
votes
1answer
584 views
Set post terms by term id
I'm trying to add post to custom terms within a custom taxonomy. Not sure if I'm tackling this right. So far we have the custom taxomony 'warehouse', and the custom term 'Old Stock'.
Problem is that ...
1
vote
1answer
218 views
How to edit/remove a term that's in multiple taxonomies?
Some of the terms on my site appear with the same exact slug, in multiple taxonomies.
For example: 'education' appears in both the 'department' taxonomy and the 'topic' taxonomy.
Now, I can't seem ...
0
votes
1answer
215 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 ...
3
votes
5answers
3k views
Custom order of terms for custom taxonomy in admin and website
I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). ...
0
votes
1answer
350 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 ...
4
votes
1answer
176 views
Large taxonomy (2000+ terms), causing WordPress to hang
I have a large taxonomy (and about to grow a lot larger) with several thousand terms in it. When I'm editing a post, there is now a significant hang when it goes to load the term list.
Has anyone run ...
0
votes
1answer
154 views
Combining these queries? (Same taxonomy term + same category as post)
I´m not to good at coding so I could use some help with this!
I have a single page which below the post shows more posts from the same category. Then I have another single page which in a similare ...
0
votes
1answer
628 views
get_term_by not working when in functions.php
I have an odd issue with get_term_by(). It's working fine when I use it inside a template, but when I use it in functions.php it just returns false.
$term = get_term_by('slug', 'some-term', ...
1
vote
1answer
771 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
86 views
Checkboxed term search
Anyone know if I can make a checkbox-list with all terms from a taxonomy, and search for the posts belonging to the checked terms? Listing categories in the checkboxes also would be a bonus!
0
votes
3answers
4k views
get_posts assigned to a specific custom taxonomy term, and not the term's children
Say I have the following taxonomy terms:
Term 1
Term 1.1
Term 1.2
Term 2
Term 2.1
How can I get only posts that are assigned to Term 1 and not include those that are assigned to Term 1.1 or ...
1
vote
2answers
258 views
WordPress built-in method to extract array of term IDs?
I'm querying a custom taxonomy for a post, hoping to get a list of all terms for that post and taxonomy. get_the_terms($post_id, $taxonomy) works, but gives this ungodly array of term objects that ...
2
votes
2answers
884 views
Fast way to add countries as a custom taxonomy term?
Is there a quick way to add a list of countries as terms to a custom taxonomy called "Country"?
Is there an existing import file, SQL script ect...
I don't want to be there all day manually adding ...
0
votes
1answer
141 views
wp_set_object_terms timing out?
I have a list of 350 or so terms that I am trying to set to a post. Here's my code:
add_action('init', 'add_cities_to_story');
function add_cities_to_story() {
$cities_list = ...
0
votes
1answer
121 views
How do I assign a custom post to all terms in a custom taxonomy?
I'm building a database of cities as a part of a "location" taxonomy. In order for the terms to render, as far as I've found, they need to have some type of content associated with them. My ...
1
vote
5answers
6k views
How to get current term in my custom taxonomy in WordPress?
I need to display the current term in my custom taxonomy in a single post.
example:
My custom taxonomy is products and term of them is product-1, product-2 and products-3.
My post is assigned to ...
0
votes
1answer
324 views
How to display terms and conditions in post area?
I'm running a multisite.
I would like to display "Terms and conditions" when user trying to create a new post.
Users should Click "I agree" link and then proceed to create a new ...
3
votes
3answers
355 views
Exclude Child Terms From Parent Posts
How can I exclude the child term posts from showing up in the parent term posts output?? Right now it's duplicating in both parent and child term outputs.
//Function to display posts grouped by ...
2
votes
2answers
537 views
get term by id without taxonomy
Can I get the term by it's id without knowing to whish taxonomy it belongs?
I have a meta field that stores term ids, but doesn't store the taxonomy. However, all the get_term function have taxonomy ...
2
votes
1answer
2k views
How to only list the child terms of a taxonomy and not their parents?
I'm creating an age select menu in the admin, populated from a taxonomy of age. The taxonomy is hierarchical as follows:
18-25 (parent, ID 183)
18 (child)
19
20
21
22
23
24
25
26-30 (parent, ID ...
3
votes
2answers
1k views
What is 'term_group' for 'order_by' in get_terms()?
I was just reading the Codex regarding get_terms();. What exactly is the parameter 'term_group'?
You can use it in (example): 'order_by' for get_terms();.
Hint: I could be all terms that share the ...
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
398 views
How to list terms by first letter, as in A's then B's etc
I need to divide a set of taxonomy terms by the first letter of the term name. I found a few bits of code that may help but when I implement my code I get no return values. I'm sure it has to be ...
0
votes
1answer
535 views
Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
Say, for example, I have the following custom taxonomy:
Term 1
Term 1.1
Term 1.2
Term 1.2.1
Term 1.2.2
Term 1.3
Term 2
Term 2.1
How can I get the children terms of Term 1, ...
2
votes
3answers
2k views
get taxonomy name of current post
Hierarchical taxonomy of custom post type 'projects' > 'projects_category'.
Two example 'projects_category' hierarchies would be:
Big Corporates > 1st Company Name > A Post Title
Small ...
1
vote
2answers
191 views
How to list 2 taxonomy terms for a post, based on their hierarchy
I'm using get_the_terms to display 2 terms on a post, associated with the taxonomy "location". The terms are the suburb and the city. The location taxonomy is hierarchical so the suburb is a child of ...
5
votes
1answer
862 views
How can I create a taxonomy meta-box with search suggestions but no new terms input?
I was wondering how I could setup a taxonomy metabox on a post edit page that would be similar to the "tags" kind (with search field and automatic suggestions), but without the right to add a new ...
1
vote
0answers
378 views
Cleaning up a Gravity Forms 'Checkbox' field tied to large taxonomy [closed]
I'm using Gravity forms to allow my users to create posts from the front end, but I'm having an issue making a certain form-function I'd like to have work and display nicely.
Essentially, I want my ...
0
votes
1answer
140 views
Add Column to Term Database
Currently the Term Database has four columns. term_id name slug term_group. I would like to add another column called menu_order.
How can i do this?
The outcome i want is to be able to order my ...