In WordPress, terms are itens set to a taxonomy, i.e. when you create new categories or tags you create new terms.
1
vote
0answers
379 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 ...
1
vote
2answers
253 views
How to show only terms by id or slug on edit-tags.php (custom taxonomy manage page) for a custom taxonomy
How can I show only terms by id or slug on edit-tags.php (custom taxonomy manage page) for a custom taxonomy.
I am saving term_owner metadata to a table for each term and getting all terms' ids for a ...
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
3answers
4k views
Get current term's ID
Im using the following code to get an array of children taxonomies and write them out with links in an unordered list.
<?php
$termID = 10;
$taxonomyName = "products";
$termchildren = ...
0
votes
2answers
417 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 ...
0
votes
3answers
451 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.
0
votes
2answers
157 views
A mandatory agreement form to access another page?
I want to set up a page with a form the visitor needs to fill out and accept terms before going on to another page. Is there a plugin to do this? If no plug in, is there another way?
Any help would ...
0
votes
1answer
140 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
896 views
Update term count using a callback function
With the wp_update_term_count_now, how can I use the update_count_callback to specify my own count. I need to include counts from another database that the current database category is able to ...
0
votes
2answers
87 views
Leveled - Terms foreach
I need to build a php foreach that goes through all my terms in my custom taxonomy 'Section'.
I know how to get a foreach of all the terms in 'Section', but what i cant do is build it with levels.
I ...
0
votes
3answers
1k views
Is there a way to import terms into Wordpress?
I'm tired of typing in lists of counries in my "Countries" taxonomies. What's a good way to bulk import a long list of terms into Wordpress ?
0
votes
1answer
34 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
1answer
27 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
32 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
25 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
41 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
1answer
202 views
Querying posts by latitude and longitude to build a Google Maps with several markers
I have 4 different post types and 4 differey taxonomies Each term for each taxonomy stores a marker (url to a png icon). Each post has coordinates attached with Advanced Custom Fields and I'll ...
0
votes
2answers
178 views
How can I get category ID by category name?
I have a few categories with the same name [some of them are sub-categories]. And I want to get an array of ID's for certain cattegory name.
I tried this:
$term = get_term_by('name', $cat_name, ...
0
votes
1answer
88 views
Get Categories Where Taxonomy Equals 'n'
I have a custom taxonomy(the taxonomy is types) that is basically a selector that tells WordPress which section of the site to place the new post.
So for example
I create a new post and select ...
0
votes
1answer
186 views
echo term name outside the loop, using term slug
I have a strange question...
I have my term as a variable...
$mailer = 'may-2012-newsletter';
And I'm trying to echo on my page the Name of my term, using the variable above. But this is not in a ...
0
votes
2answers
728 views
Query posts using custom taxonomy and selected terms
I'm not able to use array for the terms in the following query, only a single term:
$args=array(
'facts' => 'information', //taxonomy:facts and term:information
'post_type' => ...
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
1answer
43 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 .'/' ...
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
431 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
217 views
Unsetting post_tag taxonomy breaks term description for other taxonomies
Here's something I can't figure out. I don't need the default post_tag taxonomy, so I'm removing it with this piece of code :
function mwm_unregister_taxonomy(){
global $wp_taxonomies;
...
0
votes
1answer
773 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 ...
0
votes
1answer
326 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 ...
0
votes
1answer
548 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, ...
0
votes
1answer
188 views
Remove a href from this code
I am using a short piece of code(which is modified, originally it was a plugin-Taxonomy Terms List) to display custom taxonomies after the post,
When the terms are displayed, it is displayed with a ...
0
votes
1answer
803 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
1answer
841 views
Fixing category count
Somehow my post counts are incorrect due to inserting rows via php. I have the following code to update the count, is it correct?
global $wpdb;
$result = mysql_query("SELECT term_id,term_taxonomy_id ...
0
votes
1answer
20 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
42 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
25 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
1answer
401 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 ...
0
votes
1answer
86 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
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 ...
0
votes
1answer
141 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 ...
0
votes
3answers
370 views
Get current term in single.php
I have a custom post type (dibujos) and 4 custom taxonomy.
I would like to get term name in a current post.
The probleme is, how to To display the name of the taxonomy, no matter what taxonomy is.
...
0
votes
1answer
320 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
46 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
1answer
115 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
130 views
How to get terms of not only the current cat but also of all its children
I'm modding a theme to use parent taxonomy terms instead of all taxonomy terms, now I've been able to only display the parents, but now I've run into a count problem.
Basicly this is the code that ...
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
130 views
Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?
I added the code below and successfully changed my CPT slug for the taxonomy terms. My blog permalinks are /article/%postname% in case you wonder, and I'd like to keep it that way, so no clashes with ...
0
votes
1answer
184 views
How can I query all post with currrent taxonomy term?
I created the taxonomy 'machine types', and added several terms to it, like 'cranes' for example.
The url to that term now looks like this: domain.com/machine-types/cranes
How can I make this url ...
0
votes
1answer
132 views
term_exists returns NULL
According to the codex ( http://codex.wordpress.org/Function_Reference/term_exists ), term_exists returns some mixed results but not NULL. In my case, I'm getting NULL, what am I doing wrong?
In ...
0
votes
1answer
46 views
Trying to display terms from custom taxonomy within function
I have a function that is giving me this error - Catchable fatal error: Object of class stdClass could not be converted to string in.... blah blah
Below is some of the code from the function. It is ...
0
votes
1answer
177 views
How to get the term description in a taxonomy term archive query?
I'm creating a template for a custom taxonomy for my theme.
At the beginning of the page, before the loop that lists all the posts associated to a term of that taxonomy, I want to output the ...