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

How to convert custom post type based list to a dropdown list?

the_title() and the_permalink() are functions that automatically echoed. Use in this case get_the_title() and get_permalink(). the code should look something like this: while ( $query->have_posts($post->ID) ) : $query->the_post(); echo ‘<li><a href=”‘. get_permalink(). ‘”>’ .get_the_title() .'</a></li>’; endwhile; Here is another way using the_title and the_permalink: while ( $query->have_posts($post->ID) ) : $query->the_post(); ?> <a href=”https://wordpress.stackexchange.com/questions/191514/<?php the_permalink(); ?>” … Read more

WordPress export tool doesn’t export post-format value of custom post type?

After spending time debugging export.php, I found that we have to register post_format taxonomy for our custom post type. register_taxonomy( ‘post_format’, ‘portfolio’, array( ‘public’ => true, ‘hierarchical’ => false, ‘labels’ => array( ‘name’ => _x( ‘Format’, ‘post format’ ), ‘singular_name’ => _x( ‘Format’, ‘post format’ ), ), ‘query_var’ => true, ‘rewrite’ => $rewrite[‘post_format’], ‘show_ui’ => … Read more