0
votes
1answer
14 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
1answer
34 views

Show Custom Post Type taxonomy term that matches custom field

Not sure how well I can explain this but I will try. I have two Custom Post Types. One is "Locations" and one is "Members." I need to show only the members that belong to the location. "Locations" has ...
0
votes
0answers
35 views

Wordpress Custom Post Type and sort by Tags

I am currently making a custom Wordpress theme, but so far I am stuck at this little problem. I have created this custom post type. And in that page (media.php) I want to be able to click on the tags, ...
0
votes
1answer
34 views

Saving category as insert post

I'm having a problem with $_POST a category. I got something like that : // ADD THE FORM INPUT TO $new_post ARRAY $new_post = array( 'post_title' => $title, 'post_content' => ...
0
votes
1answer
18 views

How to show all of aspecific post type that has taxonomy and a specific term

i have a post type called directory_listing, i have a taxonomy called 'place' and I have terms in that tax for place1 and place2. I need to display all the 'directory_listing' posts that use the term ...
0
votes
1answer
94 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
79 views

Show all terms of a custom taxonomy?

I made a few custom taxonomies and I need to show ALL the terms from it, what I achieved so far is showing the taxonomies that are selected/chosen in a custom post type but I need all of them to show, ...
0
votes
1answer
93 views

Categories under custom post types doesn't show properly

I used a custom post type in my website: I added archive-{mytaxonomy}.php and also single-{mytaxonomy}.php. I also created a separate sidebar for my taxonomy and everything looks fine until I click ...
0
votes
0answers
70 views

How to use if statements to check and echo terms by hierarchy in a post?

I'm seeing a lot of posts on here with helpful snippets to resolve my problem, but nothing has been specific enough to help me - or I just don't understand how to make those solutions work for my ...
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
0answers
208 views

How to show only subcategories in parent category not parent category?

I just want to show only subcategories of specific parent category on parent category page. I have 1 parent category videos and 3 child categories art,funny,and technology of that parent. I didn't ...
0
votes
1answer
315 views

Get custom post type list for every category shortcode

I am trying to make a shortcode to list all custom posts under the category they are under. Here is my code and I am no expert of coding but i thought that this would work. If someone can tell me what ...
0
votes
1answer
27 views

Pass custom value to custom taxonomy

I'm trying to pass a custom field value into a custom taxamony whenever I publish a post. Everything works fine except the meta value part. I can only pass strings. In the codex it says that ...
0
votes
1answer
64 views

Compare Two Custom Post Types Using The Same Custom Taxonomy

I have two post types, courses and testimonials, sharing the same taxonomies. What I am looking to accomplish is to check whether a course is in the same category as a testimonial. Then display if it ...
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
100 views

Getting taxonomy images to display on single-post with their terms

Having some trouble with taxonomy images plugin. I am on single-post.php and I want to display my post's taxonomy terms & the term's associated images. Ideally, I'd like the taxonomy description ...
0
votes
2answers
1k views

Rename “Portfolio” slug?

I have a WordPress theme that I am working with called "Forte". Yes, it is a premium theme. I have reached out to the developer but apparently he doesn't really want to help in this situation. Well I ...
0
votes
1answer
36 views

Using page title as a link to term archive

i want to do something like that (pay attention to line 4): $term_link = get_term_link( $term, 'genre1' ); if( is_wp_error( $term_link ) ) continue; echo '<li><a href="' . $term_link . ...
0
votes
1answer
43 views

Wordpress custom taxonomy

I'm using a custom taxonomy called 'product_cat' and post type called 'product', I'm trying to display all parent terms, child terms and grandchild terms within the taxonomy. So I get a list like ...
0
votes
0answers
112 views

How to get list of custom taxonomy terms and display count?

This is actually a three-part question. 1.) How do I get list all terms of my custom taxonomy (in this case, 'audiocat')? 2.) How do I display the count of each term? Example: Rock (5) Pop (3) ...
0
votes
1answer
135 views

Taxonomy Archive: Display only one post per term from separate custom taxonomy

I am having trouble coming up with a solution for product catalog I am building using custom post types and 4 custom taxonomies. The product catalog is separated by "model", but each "model" can have ...
0
votes
1answer
700 views

conditional statement for custom taxonomy

Struggling to find out how to achieve this, if it is at all possible. The equivalent of is_category but for a custom taxonomy I've set up. The taxonomy category if which being Taxonomy Name with 2 ...
0
votes
2answers
125 views

Get used terms by an author as array of strings

I am using list_author_used_terms function below to get the terms used by a specific author (terms of a custom taxonomy 'wossom' for a custom post type 'aya-bi-aya'). function ...
1
vote
2answers
253 views

Sum custom field values of particular taxonomy

I need to sum custom field values of a custom post type with a particular taxonomy ONLY. For example... Custom Post Type: Computers Taxonomy: Laptops Custom Field: Quantity How can I get the ...
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 ...
0
votes
1answer
120 views

Control content before and after custom post type loop

I am trying to create a left nav menu that contains a couple of different taxonomy lists of a custom post type. For example, the left menu might look like this... <h2>New Stuff</h2> ...
0
votes
1answer
43 views

Looping taxonomy in taxonomy?

So I have a CPT of references (like a dictionary kind of format for music). In it there are two taxonomies: medium_reference and reference_letter. The reference_letter lists letters A-Z, while ...
0
votes
3answers
66 views

Pull Tags But Not as Links

I'm trying to take a list of tags and list them on the page but without linking to their archive page. At the moment I'm doing this: <?php global $wp_query; $postid = $wp_query->post->ID; ...
0
votes
1answer
232 views

How to break up php code to avoid echo

I have this php code I am using to list all post (titles) with the taxonomy categories names, and its working fine however I will like to break it up and avoid using echo within the php code so that I ...
0
votes
1answer
41 views

Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax

I have CPT "Dealers" and a custom tax of "States" where each post in the CPT is associated to one state. The hope is to create the header for the state then list each post in that state taxonomy under ...
0
votes
1answer
159 views

Query specific posts per user selections from dropdown menus

This may be a little different than most people do. I'm trying to show certain posts that are determined by 4 different "categories." I have a large database table full of "products" (I'm using the WP ...
0
votes
1answer
77 views

posting twice from an array?

I dynamically create iterations of a form field with jquery, but they all carry the name extrakosten[] for the first variable and the other variable vergoeding[]. The php: $postTitle = ''; // save ...
0
votes
1answer
956 views

Custom Post Type Taxonomies -Posts not showing in Category or Tag pages

I have a made a custom post type called "Member Resources" the posts under this CPT have a few taxonomies such as categories and tags. Tags = "Diversity" Categories = "Guidance" When I go to the ...
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
288 views

Include a specific post to the query_posts and remove it if it is already in the returned list

Bare with me. Firstly, here is my whole script for my featured slider articles: <div id="featured" class="<?php if ( $responsive ) echo 'flexslider' . $featured_auto_class; else echo ...
0
votes
2answers
174 views

PHP displaying wrong custom taxonomy images

I'm using the Taxonomy Images plugin to try to pull in the category images for custom categories on a page that displays all the categories my site has. For some reason, this code outputs the correct ...
0
votes
1answer
269 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 ...
-1
votes
1answer
260 views

Award points if a specific custom taxonomy is selected - Cubepoints

I run a multiple author platform where Cubepoints is a major part of its point and ranking system. I have added a custom category taxonomy called highlight and it contains two items: featured and ...
0
votes
2answers
2k views

Get custom post type categories to show up in menus

I'm wondering how it's possible to add custom post type categories as an option to add as a navigation menu item. What I have: $portfolio_args = array( 'labels' => array( 'name' => ...
1
vote
0answers
59 views

need help with existing code showing subpages

I am helping a friend make some changes to a wordpress theme. At the moment displaying subpages works only for one parent and its subpages (the one with id 31), but we want it to work for all pages ...
2
votes
3answers
2k views

How to Add Custom Fields to Custom Taxonomies in Wordpress CLEANLY

Saving extra fields that were added to a taxonomy. I want the most proper & efficient way of doing so. Where should I save the new fields? 2 possible solutions are to 1) Use the Wordpress ...
0
votes
1answer
266 views

Setup page template array in a custom post type

Hi below is a 'case' (in a custom post type) for pulling all categories and displaying them as a drop-down menu. How can I do the same but turn it into a list of checkboxes? //tax_select - this ...
2
votes
2answers
292 views

Create new category upon save based on post information

After finding a couple of leads on how to do this, I'm coming up blank. What I am trying to accomplish is to add the post to a new category based on camera name. If the category doesn't exist, then to ...
0
votes
1answer
202 views

Wordpress: Displaying all the post tags from within a specific taxonomy's term

Okay so I understand that the default "Categories" is a taxonomy, and posts live within those categories. I created a new Taxonomy (like Categories) that houses a custom post type. The posts of that ...
0
votes
2answers
855 views

how to insert content into my taxonomy

how to insert content into my taxonomy this code is correct or not? // Create post object $my_post = array( 'post_title' => 'My post', 'post_content' => 'This is my ...
1
vote
1answer
713 views

Custom field values to taxonomy terms

I have a "author" custom field with the names of author. I want to add some new features to the site so I decided that custom taxonomies will be the best solution. So what I need to do is to get the ...
0
votes
1answer
554 views

working with term_relationships table

I have this little code to insert posts via custom form: $post = array( 'post_author' => 1, 'post_title' => 'my title, 'post_content' => 'my content', 'post_category' ...
1
vote
2answers
317 views

Conditional display for custom fields/taxonomy

If there's a value for the custom field, I want it to display the value. If there's no value for the custom field, I want it to display "N/A". I have this working for custom fields but cant replicate ...
2
votes
4answers
5k views

Get custom post type by category in a page template

I've created a custom post type with categories and sub categories, what I need to do is list out the post titles and images for a given sub-category or category in a page template. I've got as far ...