Tagged Questions

In WordPress, terms are itens set to a taxonomy, i.e. when you create new categories or tags you create new terms.

learn more… | top users | synonyms

0
votes
2answers
22 views

get_terms: determine if taxonomy term has children

I'm looking to determine if a taxonomy term has children. See the below markup and I'll explain what I mean: <?php $terms = get_terms("wpsc_product_category"); if ( !empty( $terms ) && ...
0
votes
1answer
19 views

Custom Wordpress Excerpt within terms

Is it possible to show an excerpt of the place in the feature where the search (term) result/hit is? Thanks
3
votes
1answer
23 views

Modify Term Update Redirection

Whenever I update a term it currently redirects me back to the edit-tags.php page for that taxonomy, the term list. Is it possible to instead of redirects to the term list to instead bring me back to ...
0
votes
0answers
24 views

Content instead Excerpt on term

Is it possible to show limitation (dynamically) of the contents near the search term value. I knew how how to using excerpt, but what I am talking about is, search result content limitation character ...
0
votes
2answers
25 views

get taxonomy terms for parent and child

I have a function set up that prints the taxonomy term name and slug for every products-category taxonomy term present. This works great, but it's just displaying them alphabetically like so ...
0
votes
1answer
17 views

Accessing Post ID Within Loop

I have a page called Products with an ID of '8' Within that, I have the following template part <?php get_template_part('loop', 'feed-products' ); ?> Then within that file, I have this ...
0
votes
1answer
25 views

query multiple taxonomies

I have a function set up to show 'Similar Products', i.e. showing products that share the same products-category taxonomy term. This works great but I want to narrow the function even further and make ...
0
votes
1answer
12 views

Custom query to get terms from post ids

I want to get the terms object by given posts ids. I don't know much about sql, and this kinda complicated for me. Here is what i tried: global $wpdb; $taxonomy = 'category' $term= ...
0
votes
0answers
10 views

Get List of Taxonomy terms used in another taxonomy term [duplicate]

I'm using WooCommerce for WordPress powered cars store. I've registered new taxonomy called "car types" which contains terms like: "new cars" and "used cars". I want to query the "product_cat" terms ...
0
votes
1answer
48 views

If product is in sub-category show code

This code works with categories but not with child sub-categories. How can I make it work a child category that is not in the url (slug)? global $post; $terms = wp_get_post_terms( $post->ID, ...
0
votes
0answers
27 views

Get a “featured” taxonomy term using a custom field checkbox

I'm using Advanced Custom Fields to add a true/false checkbox to the taxonomy management screen. I want to show (a) the most recent term in the taxonomy that (b) has the checkbox selected to true. I ...
0
votes
0answers
70 views

Issue on Counting CPT's Under Taxonomy Term

I am using this code to count number of Custom Post Type $tax_terms = get_terms($tax, $args); foreach ($tax_terms as $tax_term) { echo '<li>' . '<a href="' . ...
0
votes
1answer
25 views

Showing HTML if Post is In Certain Taxonomy Term

I'm using the following code to display an image based on which category a post is in on my blog. I'm trying to use this same concept under my custom post type. Instead the category is a Term in my ...
1
vote
0answers
21 views

Show List of Terms (not posts) that have been Recently Updated?

Is it possible to prepare a list of terms that have been recently updated? For example: I have custom fields attached to my terms and I would like to show a list of terms that have been updated say ...
0
votes
1answer
46 views

How to List CPTs Under One Tax Term

I am having some difficulties to get CPTs which are under one Tax Term. For Example if I have a Taxonomy Called "Movie" and Tax terms as: A B C How Can I list CPTS which are in Tax "Movie" and ...
1
vote
2answers
44 views

Display assigned terms with link

I want to display product assigned terms, wrapped in link/anchor MarkUp, in my sidebar on a page as a widget. I am not getting the correct tag URL. Code returns visited product URL instead of listed ...
0
votes
1answer
28 views

Insert form checkbox at bottom of taxonomy edit term page

I have created a custom taxonomy 'provider'. I have also added a checkbox to the add and edit term pages. The problem is that the checkbox I have created is showing at the very top of the page - right ...
0
votes
1answer
42 views

How to show post for a particular term of custom taxonomy?

I have created a custom taxonomy for a custom post. Now i want to show all post related to a particular term. Suppose i have two terms term1 and term2. When click on term1 then all post related to ...
0
votes
0answers
46 views

If taxonomy has child-category then show child else taxonomy post

i have a custom post type name 'post_type' => 'albums' and taxonomy 'taxonomy' => 'albums_cate'. i have 4 parent taxonomy name -"personal,happy,smile,cry" and "personal" have 2 children(sub-category). ...
0
votes
0answers
19 views

Get proper tag count for each post type [duplicate]

I am working on a plugin to port over a Druapl 7 installation to WordPress. I've found some useful tutorials on how to do this for Druapl 6 but Drupal 7 seems to lack any information. Nonetheless, I ...
0
votes
0answers
48 views

Foreach inside shortcode not working as planned

I have a loop inside a shortcode to display the list of posts for each category (schedule-day) in a custom post type (schedule). The first category lists the posts in said category just fine, but ...
0
votes
1answer
45 views

How to order a list of taxonomy terms alphabetically?

I have the following code to list taxonomy terms in a drop down list. It works great, except the list in the drop down isn't in alphabetical order. How do I modify the code to list them ...
0
votes
0answers
18 views

Default metadata for Custom Taxonomy when using Add New Item on Post Edit

I have created a custom post type, that has a hierarchical custom taxonomy. This taxonomy has extra custom fields tied to it that save to a custom table in the DB. These fields have default values set ...
1
vote
0answers
33 views

Create Search Form to Filter Through Terms

I have pages that displays a list / grid view of all my taxonomy terms. Over 200 terms. The page is paginated since there are so many terms, however, I would also like to include a "search" box at the ...
0
votes
2answers
110 views

Order get_terms using a Custom Field

I have a custom taxonomy of "crb_issues" that has a custom field associated with it that is "issue_date" which outputs a date value for each term to looks a lot like "20140601" yearmonthday. I am ...
1
vote
1answer
149 views

Display empty taxonomy terms with get_terms()

I have a function setup as follows: <?php $terms = get_terms("wpsc_product_category"); if ( !empty( $terms ) && !is_wp_error( $terms ) ){ foreach ( $terms as $term ) { ?> ...
0
votes
1answer
59 views

Adding taxonomy terms based on custom field

I have a custom post type that I am setting up so that different sets of custom fields are displayed based on the type of post it is. Its one of three (collection, product, or variant). I have ...
0
votes
1answer
62 views

Display post titles that match string in post content

I'm trying to search through the content of the current post and look for any strings in the content that match the title of any 'term' custom post types. The idea is that any terms we have that ...
5
votes
1answer
99 views

Can I lock down custom taxonomies on a parent term level, but not a child term?

I've created a taxonomy called "topics" which has 4 top level terms: science environment technology cant remember the last one and each of those terms will have child terms. I want to be able to ...
0
votes
0answers
94 views

Get Metabox taxonomy value and create metabox for termmeta

I got a big problem here. What I want to do is: Create Taxonomy meta box in the post edit screen, lets call it "text_from" Then Depending on the value of the "text_from" meta box display a field ...
0
votes
0answers
57 views

How to group by custom posts by child taxonomy term

I have registered a custom post types named "property" , a custom taxonomy "city" is associated with that post type . I have couple of city like Ontario Toronto street 1 street 2 ...
0
votes
0answers
25 views

wp_set_object_terms bugging

I'm working on a plugin where I set custom terms for posts on save. I use the save_post hook. It all works fine except when I for example also change the title of the post, the custom terms setting ...
2
votes
1answer
38 views

Show posts without term

I am working on a product page where I show reviews from my post type 'reviews', if the product page title matches with my term from the taxonomy 'review-product'. Example. Product page title: ...
5
votes
2answers
269 views

Passing a hardcoded page/post ID into `get_post`

I see people using this to pull in page content on their home pages, remove specific categories from archives etc.. e.g. $post = get_post( 5 ); Someone suggested this was bad practice. Why is it ...
0
votes
1answer
15 views

How to retrieve the permalink for a specific (custom) term?

I would like to display the list of categories related to particular post? <?php while ( $faktory_panes_query->have_posts() ) : $faktory_panes_query->the_post(); $post_id = ...
2
votes
1answer
49 views

Does WordPress Offer a Way to Find All of the Categories that Don't Have Children?

Background As discussed in Is There a Difference Between Taxonomies and Categories, taxonomies refer to a generalized system of classification and organization of objects or data. In the case of ...
0
votes
0answers
23 views

Paginate Term Archive? [duplicate]

I have a custom template displaying an "archive" of terms. When a term is clicked it takes the user to a list of all the posts assigned that term. I am not using a traditional loop to achieve my term ...
2
votes
1answer
71 views

Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy

I have registered a custom post type "Animals" and also two custom taxonomies ("Vertebrate" and "Type") assigned to it, which have their own specific terms, for "Vertebrate" it will be "Mammals" and ...
1
vote
3answers
58 views

Exclude Taxonomy Terms from Template Via Back End?

I'm wondering if you can help me work through an issue or provide alt ideas. I have an archive displaying a list of custom tax terms in a grid view. My client needs to be able to turn on/off the ...
8
votes
2answers
1k views

Is There a Difference Between Taxonomies and Categories?

I've been reading the codex for WordPress closely and am confused about the vague definitions between what a Taxonomy is and what a Category is. For that matter, term is also a word that is used in ...
1
vote
1answer
73 views

display taxonomy slug from term ID

I'm trying to display the taxonomy slug from the term ID, thus my current code is like so: <?php $catinfo = get_category(array_pop(get_sub_field('sector_selector'))); ?> <?php print ...
1
vote
0answers
179 views

Use custom walker to add taxonomy terms to main nav menu

I created a Custom Post Type: Product and a Taxonomy assigned to it: Products So under that Taxonomy I can add different types of products (terms if i'm not mistaken). When adding new products I get ...
0
votes
1answer
47 views

Permalink Rewrite to include Custom Taxonomy Term

I've created a custom taxonomy for posts using register_taxonomy( 'discipline', array('post'), /* if you change the name of register_post_type( 'custom_type', then you have to change this ...
0
votes
1answer
53 views

How to add custom taxonomy terms to posts in bulk

I have a taxonomy called Teams. Now I want to assign different teams to posts based on their tags. For example, all posts with tag "LA Lakers" should be assigned the taxonomy term "LA Lakers"
0
votes
1answer
42 views

How to stop the deduction in “wp_term_taxonomy” count, when the post is deleted?

In wordpress, the normal behavior is, when you delete a post, the system automatically performs a deduction of a post (-1) in wp_term_taxonomy table in count field from a taxonomy row which it belongs ...
0
votes
0answers
22 views

Sort WP Taxonomies

Is there a way to sort a custom taxonomy term list in order of recent updates to posts inside that taxonomy? Example: Custom Post Type: Research Custom Taxonomy: University Research Custom Tax ...
0
votes
2answers
22 views

Display what taxonomies a custom post has?

I've trying to search high and low for this but am having a really hard time. Essentially, I have a custom post type called locations with taxonomies. The posts in "locations" are categorized under ...
0
votes
1answer
96 views

Exclude Custom Post Type from shared Custom Taxonomy

I have a few custom post types and two of them are sharing a custom taxonomy. Is there a way to list the terms of that taxonomy for only one of the custom post types? At the moment I can get a list ...
0
votes
2answers
41 views

Get multiple term objects by ids

I have an array of ids that correspond to terms. How do I get the full term objects for each id? $ids = array(1,2,3); Ideally, I would love to be able to do something similar to the way taxonomy ...
0
votes
1answer
48 views

get_adjacent_post_link excluded_terms ignored

I call the function ´get_adjacent_post_link´ using the argument ´$excluded_terms´. But this argument is ignored. This is how I call the function. get_adjacent_post_link( '%link', '<span ...