0
votes
1answer
25 views

Can't get link if there is no post available

I have a function which creates a link for the taxonomy term , with the selection of post_type. function get_custom_term_link( $term, $taxonomy, $post_type ){ $link = get_term_link( $term, ...
0
votes
1answer
13 views

Get category id for a custom category and display it in a class

I am having trouble displaying my custom category ID to my li ID. The code I am using below is displaying the post ID of the post category instead of the custom category. What I am trying to do is ...
0
votes
0answers
8 views

Rewrite rules for subterms in custom taxonomies

I am using a large number of custom taxonomies. My post type is called "location" and there is a parent term "Asia" and a subterm "Thailand". Now I created the taxonomy archive template files ...
0
votes
0answers
12 views

Limit to One Custom Taxonomy Selection, Including Most Used

I've got a bit of code that limits my custom taxonomy to only allow the user to select one category, by turning the checkboxes in to radio buttons. See the screenshot below for example: I need the ...
1
vote
1answer
79 views

How do I add a custom post type to the Featured Content in twenty fourteen theme?

This wpmudev post sums up my feeling exactly about twenty fourteen: Featured Content does not support custom post types – only posts are selected even if the custom post type supports the Tags ...
1
vote
1answer
36 views

Insert HTML inside link in a walker

I've got a custom nav walker that (theoretically) pulls the featured image from the most recent post in a custom taxonomy, and displays the the image after the link in a wp_list_categories. The ...
1
vote
2answers
141 views

How do I add customize_register action AFTER adding a custom taxonomy

customize_register only works with the customize_register hook, and regardless of what hook I use to add the custom taxonomy, it always happens after customize_register. (I want to loop through the ...
0
votes
1answer
92 views

Foreach loop returning more than one item when querying taxonomy

I am querying the taxonomy terms and then listing the posts that are under those terms. The taxonomy is basically a category for a custom post type, and the terms in it are the categories. I didn't ...
0
votes
1answer
14 views

Function to erase every post from a taxonomy

I'd like to have a piece of code that erase every single post from a taxonomy of a post type when triggered. How can I do it? Thank you.
0
votes
1answer
28 views

Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?

I'm in the process of creating a leveled tutorial structure in WordPress and want to build it so that it sets up the front-end with no code needed from the user. So far, I have a custom post type ...
0
votes
1answer
318 views

Pass a Select List Value into Functions.php function Tax Query Array

Hoping someone can assist as I am very new to the whole functions.php/wordpress coding side of things but I basically have the following use case that I am trying to achieve through the use of Gravity ...
0
votes
1answer
59 views

add slug beside name in Admin Category Checklists

im creating a lot of Categories with the same Name and different slugs, but im having problems identifying which is which in the admin panel, so i came up with the idea of inserting the slug besides ...
1
vote
0answers
118 views

Add term to custom post type on draft

I'm trying to automatically add a custom taxonomy term to custom post type when the custom post type of property is created. The action is firing but it is not adding the term. I know it is firing ...
0
votes
1answer
79 views

Possible to register multiple custom taxonomies in one function?

I'm registering 7 custom taxonomies in my functions.php. Since each function uses the same labels and arguments and is attached to the same Custom Post Type, I'm wondering if it's possible to register ...
0
votes
1answer
53 views

Where to put code to get custom taxonomy term id?

Let me preface this by saying that I am new to Wordpress customization and don't know how to write code, but I can stumble through customizations involving simple copy/paste instructions. So, this ...
1
vote
1answer
254 views

Scheduling posts to update once per day with wp_cron

I have a function that hooks into save_post that changes the value of a custom taxonomy term based on today's date. That's working fine. When I update a post, the taxonomy term is updated correctly. ...
0
votes
1answer
59 views

Update Post Taxonomy Automatically Based On Date

I am using the below function to set a custom post type taxonomy to a certain term based on the current date. This is for an event that lists upcoming, ongoing, and future events at a venue. I need ...
0
votes
1answer
106 views

How to load several hierarchical categories from functions.php

I need to insert several categories (about 400) into my site. The categories are hierarchical. I would like to load them from functions.php but now I can add one category at time, like this: ...
0
votes
2answers
115 views

making php value numeric

I used some of this code from this page on Stack Overflow: Using wp_query is it possible to orderby taxonomy? It's about the function to be able to sort a query by a taxonomy value. Although it works ...
1
vote
1answer
339 views

Custom Post Types relationships

I have a custom post type for my videos. I need do related it with other post category. And i have 10 category Like this : Post Category - Video Category Tech Tech Marketing ...
1
vote
0answers
143 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 --*/ ...
2
votes
1answer
360 views

Adding 'active' class to custom taxonomies using walker in functions.php

I'm trying to use the following code in functions.php in order to show a menu with categories (custom taxonomies actually). I simply want it to show active when on the current page. What am I doing ...
0
votes
1answer
111 views

Taxonomy archive template not working

I have a custom taxonomy (Talks) I create for custom taxonomy taxonomy-talks.php its working on my localhost. When I upload FTP still call archive.php or taxonomy.php. It must call ...
0
votes
1answer
136 views

Taxonomy term description with style, only if the description exists?

I am attempting to add a conditional function to my index.php that will return the description of a term in my custom taxonomy on the page for that term above the list of posts only if the description ...
0
votes
1answer
267 views

Custom Loop for custom post type. Compare by meta_value?

I'm a bit confused. I have a custom-post-type named wr_event. I'm using the code underneath to loop through all "upcoming" events (defined by the meta_key `event_date). The problem I have now is that ...
0
votes
1answer
37 views

Function code problem

I changed my taxonomy slug from singular to plural ("state" to states"). Ever since then my taxonomy has been broken. It used to say OTHER instead of the state name. Now my urls look like this ...
0
votes
1answer
59 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
174 views

Invalid Taxonomy in template

I have looked through the posts here that involve this same error, without any luck. I have a Custom Post Type (Staff) and a custom taxonomy for it. Making Staff posts and assigning terms is working ...
0
votes
2answers
289 views

Automatically assign a custom post to a custom taxonomy based on custom field value

We have a custom post type called listings, and each listing has a custom field zipcode (which is a 5 digit number). We then have a custom taxonomy area, which can be "New York", "Los Angeles" etc. ...
4
votes
3answers
1k views

clients list using wordpress

I am using wordpress for my new website and i have list of clients(name and their logos). I am confused how to make those editable using wordpress? Html as follows... <ul> <li><img ...
1
vote
1answer
606 views

Custom Taxonomy Permalinks Redirection

I have set up a custom taxonomy on a custom post type using the following: (For the sake of example, the custom post type is called newtype and the new taxonomy is just called newtax. // Create ...
1
vote
1answer
1k views

Custom Taxonomy Tag Search

I have an existing WordPress search function, what I'd like to be able to do is extend the search to the tags from my custom taxonomy...how do I do that? <form method="get" id="searchform" ...
1
vote
2answers
173 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
2answers
190 views

I've got a function that auto creates taxonomy terms - Can it auto delete them as well?

I've got this inside my functions.php file. function add_product_category_automatically($post_ID) { global $wpdb; if(!has_term('','product_relation',$post_ID)){ $cat = ...
0
votes
1answer
1k 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', ...
4
votes
1answer
513 views

Can I turn off write-in tags/taxonomies?

One of the big problems my site staff has had with tags is the overwhelming number of similar or duplicate tags, due to the write-in ability. I'm about to add new custom taxonomies to my site for ...
2
votes
1answer
2k views

Formating the_terms() function output

This code: <?php the_terms($post->ID, 'type') ?> Gives: <a href="/archives/type/image" rel="tag">Tag</a> What do to if I want to display only "Tag" word, not link eg. Tag ...
2
votes
1answer
1k views

How do I display a tag cloud with both post tags AND a custom taxonomy?

Using wp_tag_cloud(), how can I display a single tag cloud that incorporates both regular post tags and a custom taxonomy?