WordPress built-in method to extract array of term IDs?

I’m querying a custom taxonomy for a post, hoping to get a list of all terms for that post and taxonomy. get_the_terms($post_id, $taxonomy) works, but gives this ungodly array of term objects that will require an extra layer of parsing before I can run the following code: if (in_array($list_of_term_ids, $my_term_id)){ do good stuff… } I’m … Read more

Display Taxonomy Image on single.php

I’m using Taxonomy Images, and I can’t figure out how to display a category’s associated image on a single.php. Essentailly, when a user is viewing a post that utilizes the single.php template, it should display the post’s category’s image. Right now, it just doesn’t display anything. This is the code that I’m using: <?php $image_id … Read more

Removing the “Popular Terms” area from the Taxonomy Edit Screen in the Admin Area

Personally I really dislike how wordpress shows all the “popular terms” in different sizes on the taxonomy add/edit screen in the admin area. Does anyone know of a way to either remove this entire area completely by adding code to your functions.php file and/or how to just change this specific area so that none of … Read more

Is it possible to get a Previous/Next Taxonomy term archive URL?

I have a custom post type called shows and taxonomy called podcast. Using taxonomy-podcast.php, I having hard time finding a function that will generate next/previous Term URL Archive. For Example: URL: url.com/podcast/example-term-2 Example Term 2 post 1,post 2,post 3 Desired output < Previous Term(url.com/podcast/example-term-1) . . . . . | . . . . . … Read more

Custom Taxonomy leads to 404 page

Followings are the codes I added in my theme function.php file // Taxonomy Resource $labels = array( ‘name’ => ‘Resources’, ‘singular_name’ => ‘Resource’, ‘search_items’ => ‘Search Resource’, ‘all_items’ => ‘All Resource’, ‘parent_item’ => ‘Parent Resource’, ‘parent_item_colon’ => ‘Parent Resource:’, ‘edit_item’ => ‘Edit Resource’, ‘update_item’ => ‘Update Resource’, ‘add_new_item’ => ‘Add New Resource’, ‘new_item_name’ => ‘New … Read more

get_terms return errors

Hi when i try to get_terms(); in theme options via this code $catalogs_terms = get_terms( ‘catalogs’ ); $mycatalogs = array( -1 => ‘Select a catalog’ ); if ( $catalogs_terms ) { foreach ( $catalogs_terms as $catalog_term ) { $mycatalogs[$catalog_term->term_id] = $catalog_term->name; } } return empty but this code is working fine every where in pages … Read more

How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?

I’m using wp_dropdown_categories() for populating <select> field with custom taxonomy terms. If the code is like below: <?php $args = array( ‘show_option_none’ => __( ‘Select one’, ‘text-domain’ ), ‘taxonomy’ => ‘my_tax’, ‘id’ => ‘tax-type’, ‘echo’ => 1, ); wp_dropdown_categories( $args ); It’s working just fine. I can make the field mandatory with jQuery: $(‘#tax-type option:first’).val(null); … Read more

Custom taxonomies making WP very slow – Way to fix?

I’ve set up three custom taxonomies within my theme for attachment post types within WordPress 3.5.1. One taxonomy is non-hierarchical (i.e. tags) and has about 800 terms in it. (I’m using WP to build a quick & dirty stock photo site, and these taxonomy terms are akin to photo keywords. Yes, one could debate whether … Read more

create a back-end wordpress content submission using custom post type

I have a previously created thread here, but was recommended to make a new one: I need basic help with custom post types Basically here’s my project: I have to create a back-end wordpress gui user input section. The user will enter details about their projects like name, location, what it is, some other details. … Read more