Getting WordPress custom taxonomy/category?

I think you are getting confused by terminology here. Category is a taxonomy. Specific categories you create are terms. our_gallery is taxonomy. Landscapes is term. our_gallery is not category. It is its own taxonomy and has nothing to do with category taxonomy. get_the_category() function explicitly fetches terms of category taxonomy. To get terms of our_gallery … Read more

wp_list_categories, Add class to all list items with children

jQuery solution: You could try this if you want to use jQuery: <script> jQuery(document).ready(function($) { $(‘li.cat-item:has(ul.children)’).addClass(‘i-have-kids’); }); </script> to add the class i-have-kids to all the li parents that include the items ul.children, within the HTML generated from wp_list_categories(). Category walker solution: You could take a look at the Walker_Category class in /wp-includes/category-template.php and extend … Read more

How can I remove links from the function “get term list”?

It may be easier to just write the list manually, something like: <?php $terms = wp_get_post_tags( $post->ID ); //For custom taxonomy use this line below //$terms = wp_get_object_terms( $post->ID, ‘people’ ); foreach( $terms as $term ) $term_names[] = $term->name; echo implode( ‘, ‘, $term_names );

Filter blog archive by category in URL

Even if default posts are stored in same table but they have different behavior and different characteristics. CPT has post type archive but default post type archived is called as blog and the taxonomy filter is called as tag/category archive. You can access the category/tag archive using For categories: /?cat={category_id} //e.g. ?/cat=5 For tags: /?tag={tag_slug} … Read more

Remove “-2” from a Toolset Types URL with the same post name

It can be done by using the request filter. Something like this function alter_the_query($request) { return array(‘page’ => 1, ‘pagename’ => null); } add_filter(‘request’,’alter_the_query’); Here it forces display of post 1, though of course you will want to do a query to determine the ID. For that, it might prove easiest to first parse the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)