Tagged Questions

Since WordPress 2.3, plugin and theme authors have had the ability to create custom taxonomies-- essentially specialized "categories"-- to help organize information.

learn more… | top users | synonyms

0
votes
1answer
31 views

How to filter post data with AJAX on page?

I have build a custom post_type with "Work items" in order to enter my personal portfolio items. The "Work items" have taxonomies like "Graphics", "Websites" etc. I am able to display them all in an ...
2
votes
2answers
37 views

Taxonomy archive template to have conditional logic for displaying child categories

I have a custom post-type "downloads", and within the downloads menu, I have download categories, the taxonomy name is "downloadcats". My Downloads page uses a page template that lists all categories ...
0
votes
0answers
8 views

How to add a new menu item in “Twenty fourteen” theme?

I've created two menus inside of my theme's functions.php file: register_nav_menus( array( 'primary' => __( 'Top primary menu', 'twentyfourteen' ), 'secondary' => __( 'Secondary menu in ...
0
votes
0answers
19 views

Sub-Categories in query

I have to list all products subcategories but with pagination. I only know this method to display custom taxonomies: <?php $terms = get_terms('product_cat', array('parent'=>40)); foreach ...
0
votes
0answers
12 views

Displaying user selected custom tags/taxonomies on the front-end

I would be grateful if anybody could point me in the right direction please. I have a WordPress setup which utilises Theme My Login and https://wordpress.org/plugins/user-tags/, to allow users "tag" ...
0
votes
0answers
10 views

Taxonomy preview page?

I want to organize my posts by "categories" (with a set of extra fields) which can be previewed. If I use the built in categories or register a new taxonomy, I don't think I get the option to ...
0
votes
1answer
17 views

Get custom category name from ID

I am having issues retrieving a custom category name. I already have its ID, which is coming to me from a custom field. I don't know if it makes any difference, but I'm using Woocommerce. I'm trying ...
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
23 views

Later change of taxonomy slug base not changing permalink

When defining a taxonomy I successfully set the slug base for it as well, all via functions.php. However, any change on the slug’s base (via editing functions.php again) is being recognised, i.e. it ...
0
votes
1answer
11 views

get_category_link returning page URL

I am using the following code to display a list of categories in a custom taxonomy, except the URL returns only the current page URL. <?php $category_ids = get_all_category_ids(); ?> <?php ...
0
votes
3answers
52 views

If statement within PHP echo

I have the following to display my list of categories: $categories = get_categories( $args ); foreach ( $categories as $category ) { echo '<li><img src=""/><a href="' . ...
0
votes
3answers
24 views

Template to list categories in custom taxonomy

I refer to this post where I have just taken my code from: How to display a listing template of a certain taxonomy? I am trying to create a page template that will list all categories in ...
0
votes
0answers
12 views

Allow users to label or classify or group posts accoring to their own criteria

Is it possible to allow individual users to group posts according to their own personal classifications. Say one user wanted to class groups by read and unread ... or 'to read' or 'shared' etc. ...
0
votes
0answers
14 views

Post Editor: display categories from current post type taxonomy only?

I have a custom post type and a related taxonomy which is called "Asset_Type": Which is perfect. However, if I create a post with the default Wp Post type, I still seem them as categories: I'd ...
1
vote
1answer
18 views

Can you pre-check wordpress categories?

I have created a custom taxonomy, which has 2 terms. I'd like to have both of these checked/selected by default when someone creates a new post. Is this possible? I've searched but found no solutions. ...
0
votes
0answers
14 views

Hierarchical relationships with different custom taxonomies [duplicate]

I have a custom post type: Cars and two custom taxonomies: Makes and Models. I already created a front-end post submit form using those three elements but as you may imagine from the title, I want to ...
0
votes
1answer
18 views

Prevent custom taxonomy from being added to admin menu?

I have several custom post types, which share two custom taxonomies (location and service). The custom taxonomies show up in each post type menu, and it just seems a little redundant. My client isn't ...
0
votes
0answers
8 views

Get and display list of custom post tags and echo into data-category tag

I need to get and display list of custom post tags assigned to each post and echo them into a data-category tag. I used CPT UI to create the custom post types and tags. Here is my code... <?php ...
0
votes
1answer
22 views

Modifying rewrite rules to use <custom post type>/category/<custom taxonomy term>/

I know I can add a rewrite rule to accomplish this but I'd like to affect the links generated by WordPress (such as when I put a custom taxonomy term into a menu) I have spent the entire day today ...
-3
votes
1answer
21 views

Trying to list custom categories in custom post type

I have a CPT (products) with custom taxonomy (product-categories) - I am amending archive-products.php to list the categories and I also have a plugin installed to assign an image to the categories. ...
0
votes
1answer
26 views

Custom post type with new taxonomy [duplicate]

I have a CPT called "products" so in the menu on the left there is "products" and "add new", I want to have "product categories" within the menu too so that the user can add as many product categories ...
-3
votes
0answers
13 views

Print Friendly Prints Wrong Data

I want to use print friendly in products. I have a page jump but I need it to be just in the itinerary part. You can see what I'm talking about here. It keeps on just printing the description instead ...
0
votes
2answers
26 views

wp_insert_post via shell category not being inserted

I'm using this code: $post = array( 'post_content' => $desc, 'post_title' => $name_new, 'post_status' => 'publish', 'post_type' => 'portfolio_page', ...
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
1answer
14 views

Custom taxonomy applied to links [duplicate]

is it possible to apply a custom taxonomy to links? if so how? i already did this, but it does not seem to work: $labels = array( 'name' => _x( 'Lessons', 'Taxonomy ...
0
votes
2answers
12 views

Custom Post Type and Custom Taxonomy not connected

I am using the following code to create a Custom Post Type and a Custom Taxonomy: // Register Post Type add_action( 'init', 'cptui_register_my_cpt_resource' ); function ...
2
votes
1answer
69 views

Custom query - alternate posts by category

I have a custom post type called "services" with a custom taxonomy called "location". Each post is categorized as either "Location A" or "Location B". I need to query all posts from the "services" ...
0
votes
2answers
32 views

Get posts by category name

I'm having a terrible time trying to figure this out. I've registered a custom taxonomy (clinical-programs) and like to list all the PAGES that are assigned to particular page(s).
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
2answers
22 views

Several taxonomy query (like filter)

I have a problem with making something like taxonomy filter. My code is similar to this: $args = array( 'post_type' => 'post', 'tax_query' => array( 'relation' => 'AND', array( ...
0
votes
0answers
18 views

How to get custom taxonomy ID by custom field value

I have created custom post type products and custom taxonomy cats for this post type. Then I have added a custom field for taxonomy cats named cat_pp_id. Now I need to get taxonomy ID using value of ...
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
0answers
14 views

User Specific Taxonomy Terms

Is there any way that I can program user specific taxonomy terms. The way WordPress taxonomies work is such that if a taxonomy, say "Music Genre" is available on the site, and if one user inputs some ...
0
votes
0answers
19 views

How to add a taxonomy into admin menu

I've added a admin menu by add_menu_page function. How can I add a taxonomy in this menu as a sub-menu? If it's impossible, How can I change layout of custom post type?
0
votes
0answers
4 views

Disable ajax on custom taxonomy form

In my plugin, I have create a custom taxonomy, service (similar to default category). I want to attach a file with the service. I have completed the updates to form as well as the code that should ...
0
votes
1answer
18 views

Limit taxonomy terms added to a custom post type

I've created a Custom Post Type and a Custom Taxonomy. In WP Admin, how can I limit amount of taxonomy terms that are added to the custom post type? I want to add no more than one tag into the post. ...
0
votes
3answers
71 views

Check if post has a specific post type

I created a custom post type called "portfolio" for posts. When navigating to a post the URL shows as www.mysite/?portfolio=some-post-title In footer.php I want to display something only if the post ...
0
votes
2answers
22 views

pre_get_posts post_meta event

I wish pre_get_posts to filter posts that appear in the archive-events.php and taxonomy-eventcat.php templates. I have a post_meta in use named o_event_start that stores a value in DATETIME ...
1
vote
0answers
18 views

Deleting taxonomy terms and relationships on a custom post_type when a user is deleted

First off, I have a custom plugin that registers a custom post_type. When a user signs up on the site, a post is created using the custom post_type. The post is populated by the user's company name ...
0
votes
0answers
28 views

Custom taxonomie conditionnal

I need to create a conditional with custom taxonomy/tag. Let me explain the concept: The website is based on user's contribution (fitness/body building performances). A member create a new post and ...
0
votes
0answers
11 views

Taxonomy structure advice - ZIP Codes and Regions

In a new site I am building I need to have three different custom post types (people-type1, people-type2, events) organized by Region, but searchable by zipcode. For example, a user would type his ...
0
votes
0answers
18 views

Custom Fields of a custom post within a category list within a page

I need to construct a page containing a list of categories that include a number of posts. Each post has a set of Custom fields that need to be displayed. The hitch: Posts should be selectively ...
0
votes
1answer
65 views

tax_query showing no results

I'm creating a music database site with two custom post types: tracks and albums. I've linked the tracks to their respective albums with a custom taxonomy for the album's slug. On each album page, I'm ...
1
vote
1answer
43 views

Display only post types that are direct children of the current taxonomy

I have a hieratical category structure using Taxonomies, with a custom post displayed within them. Currently the higher level categories display all the posts that are in their child categories. How ...
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
26 views

Taxonomies, Adanced Custom Fields and Repeatable Fields

Using ACF I've added a taxomomy with a repeatable field. I've followed the instructions on the ACF support page to get it to output with no luck. I did wonder if the fact that the $taxonomy_name has ...
0
votes
2answers
51 views

Custom Post type as Taxonomy

I have a custom post type "issue" and relationship with custom post type "article". What I want is, to create the issue cpt as a taxonomy for the article cpt, and showing it in article post list. When ...
0
votes
1answer
31 views

Custom Post Type causes Page Not Found

I found a basic tutorial online which gave the rundown on how to create a plugin from scratch and sets up a new custom post type. I could not find any basic coupon plugins that accomplished what I ...
0
votes
0answers
37 views

Custom Page Taxonomy - 404 errors all over the place

I keep looking at the same few lines of PHP over and over again, and I can't make heads or tails out of why the 404 errors are happening. Here are the lines: add_action( 'init', ...
0
votes
1answer
32 views

wp_set_object_terms() is not replacing term, but creating a new one

From a custom Submenu Page if I use a hard code like: $post_id = 111; $flightCategory = array( 25 ); wp_set_object_terms( $post_id, $flightCategory, 'flight_categories' ); And refresh the page, it ...