In WordPress, terms are itens set to a taxonomy, i.e. when you create new categories or tags you create new terms.
1
vote
1answer
172 views
What hooks/filters are there to alter selected terms on post save?
Very simple, where would I hook/filter to alter the users selection of terms when they save a post (Update or Add)?
I need to hook in all instances; such as when saving a post via AJAX, saving when ...
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
109 views
Passing values by form to create a query
I have this structure:
taxonomy
- term1
-- child term1
-- child term2
-term2
-- child term1
-- child term2
I have two select boxes. First one shows the parent terms (term1 ...
3
votes
2answers
126 views
Taxonomy slug by term ID
I'm trying to modify wp_nav_menu to display term thumbnails. To get those thumbnails I need term ID and taxonomy slug: $thumbnailimg = get_the_term_thumbnail($term_id, '$taxonomy', 'medium');
I ...
3
votes
1answer
144 views
List Hierarchical Term List with Count with Related Term
What I have are custom posts (of a custom post type, wps_business) that have two taxonomies (wps_location & wps_type), and I would like to list all the terms from type of a specific location.
For ...
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
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 ...
1
vote
1answer
179 views
Displaying terms based on loop posts?
I have a shortcode that shows a loop for a custom post type:
while ( $loop->have_posts() ) : $loop->the_post();
// do something
endwhile;
Some of the posts are in categories ...
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 ...
1
vote
2answers
116 views
Check if term is in a taxonomy?
Is there a function that does something like:
is_in_taxonomy($term, $taxonomy)
Where it returns true if $taxonomy has that $term. ????
Thanks!
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 ...
0
votes
2answers
155 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
2answers
726 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
1answer
477 views
Avoid WP_Query's duplicate posts with taxonomies
Given a blog featuring several categories (such as "Sport", "Nature", etc), I've then proceded to create a custom taxonomy, which allows me to show articles in certain areas of my blog with terms such ...
1
vote
1answer
649 views
Query posts from a child taxonomy term id
this is my structure....
State1
CT1-1
- Car_Model Post-CT1-1 (the posts of child)
- Car_Model Post-CT1-2
CT2-1
- Car_Model Post-CT2-2
CT3-1
- Car_Model Post-CT3-1
State2
CT1-2
...
0
votes
1answer
523 views
How to write sql query to get the posts from a custom taxonomy term name
I hope someone will help me.............
I have a
Post Type ----> Dealers
Taxonomy ----> State
how to write a sql query in this format
$catinfo1 = $wpdb->get_results("select t.*,(select ...
2
votes
0answers
50 views
How can I get WP to build a feed based on multiple taxonomy terms
Currently, the best way to get a feed generated for a single taxonomy term is by letting wordpress generate the content automatically:
example.com/wordpress/feed?tax_slug=term_slug
However, is ...
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 ...
0
votes
1answer
135 views
Get object terms with no children?
Others have asked how to only get parent terms, but I need to get the deepest term for the post of a specific taxonomy.
Is there a way I can only get terms where the number of children = 0?
1
vote
1answer
237 views
Set attachment tags from attachment's custom field data
I currently have a custom field added to my attachment's form called artist_credit using the hook attachment_fields_to_edit. When a person enters a name into the artist credit field, I want it to (if ...
1
vote
1answer
601 views
get_term_children doesn't return an array of children terms
I am trying to get the term children and then check if they exist to display them. But I get no IDs in return of get_term_children command. This is the code:
$children = ...
3
votes
2answers
742 views
wp_get_object_terms() to get a list of all the terms attached to all the posts in the current query
How can I use wp_get_object_terms() to get a list of all the terms attached to all posts in the current query?
For example, for the current query I want to get an array of the terms from the "Alfa" ...
1
vote
1answer
134 views
Count posts for each taxonomy term for each month
Cannot figured it out... I need to count how many posts there are for each taxonomy term form each month.
1
vote
2answers
147 views
What is the difference between terms and tags?
I am working on a problem to get the most recently used tags within the last 30 days.
My current thought process is not working, so I am trying to come up with an alternative method.
I came across ...
2
votes
2answers
81 views
deleting terms programmatically
I already checked out this page; http://codex.wordpress.org/Function_Reference/wp_delete_term
It does not say what happens to the posts that may have been associated with this action. Hence my ...
0
votes
1answer
236 views
Unable to display the post titles in a drop down
I have post type Dealers and a taxonomy Manufacturer i have a list of manufacturers and relevant posts. Im trying to display the list of manufacturers in a drop down, when a manufacturer is selected ...
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
341 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 ...
2
votes
2answers
522 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 ...
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
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 .'/' ...
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
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.
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 ...
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
494 views
How to find taxonomy parent id from child taxonomy page?
This site is in beta at: beta2.dixiestarkhome.com , the page for context is: http://beta2.dixiestarkhome.com/taxon/upholstery/sofas-settees/
my custom taxonomy is "taxon", sofas is a child of ...
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 ...
2
votes
1answer
274 views
Control term order on a per-post basis
I have a taxonomy in which term order matters, but varies from post to post. So I want to be able to set the order that terms are displayed in on a per-post basis:
My first post | Tagged: Apples, ...
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
213 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
403 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 ...
1
vote
1answer
152 views
Changing stylesheet depending on custom taxonomy terms
My client would like the background & header colors to switch
depending on terms within the custom taxonomy 'Grades'. These terms
are kindergarten, first grade, second grade, etc... (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
228 views
Bug using wp_insert_term with switch_to_blog
I'm running a network of about 80 sites using WP multisite 3.2. I'm experiencing irregularities using switch_to_blog whith wp_insert_term.
To test this I have disabled all plugins, and am testing on ...
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
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, ...
1
vote
1answer
379 views
Is there a filter/action to add content to WP admin metaboxes?
I want to add an instruction into a custom term meta-box.
Is there a hook to add this or is it easiest just to use JavaScript?
0
votes
1answer
429 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, ...
1
vote
1answer
166 views
one term two taxonomy's?
Anybody got any solutions for this...
I'm building an app where I have two heirchical custom taxnomies acting as custom categories. So i've got cat1 and cat2 taxonomy.
What I want to do is copy a ...