add taxonomy as one of menu items

Finally I was able to find a way to do exactly what I wanted. Though adding Custom Taxonomy or Custom Post Type can easily be added, while having its Template file, as following: Appearance> Menus > selecting Links widget > putting link of custom post type or taxonomy http://yourdomain.com/your-custom-post-or-taxonomy But also this answer help you … Read more

Custom post type templating problem

Archive pages A & B already exist as your brand and type term archives, you can style those differently by creating taxonomy-brand.php and taxonomy-type.php templates. The remaining piece is two different single product views. The simplest way to achieve that would be to append a GET var onto the permalinks: http://domain.com/product/someproduct/?origin=brand http://domain.com/product/someproduct/?origin=type WordPress has the … Read more

Customize Query for post

The hierarchical argument when registering a custom post type should be set to false which is also the default setting hierarchical(boolean) (optional) Whether the post type is hierarchical (e.g. page). Allows Parent to be specified. The ‘supports’ parameter should contain ‘page-attributes’ to show the parent select box on the editor page.Default: false Note: this parameter was … Read more

wp_query check if integer exists in custom field’s array

First of all, your meta_query is wrong. It should be an array of an array, not just an array So, the following ‘meta_query’ => array ( ‘key’ => ‘qd_resource_author_selector’, ‘value’ => $myAuthor, ), becomes ‘meta_query’ => array ( array( ‘key’ => ‘qd_resource_author_selector’, ‘value’ => $myAuthor, ), ), Secondly, you can optimize your query. You are … Read more

Get_terms stopped working after WP 4.2

I’ve got this fixed now. Managed to talk with my old developer and he added this: $termsById = array(); foreach ($terms as $t) { $termsById[$t->term_id] = $t; } I had to add this new variable where $terms was previously used on line 14. Thanks for your help everyone, I appreciate the effort.

How to add a custom taxonomy to show up in a custom post type menu?

So to answear my own question after much googeling: In the args array I commented out the option for show_in_menu, so that custom post type creates the menu itself. Then I didn’t add the admin menu, but just the submenu (the hook still remains). add_action(‘admin_menu’,’bsp_plugin_menu’); And the first parameter is the one that shows it … Read more