Permalinks for quote authors

Create a custom taxonomy quoteauthor, activate pretty permalinks, and you get nice URIs automatically. These URIs will not put the author’s name right behind the root, but something like /qa/steve-stevenson/ should be good enough. Here is a sample code as a plugin, you can download it on GitHub <?php # -*- coding: utf-8 -*- /* … Read more

Remove taxonomy slug when not assigning taxonomy with custom post types

The post_type_link filter is responsible for modifying the permalinks that are output, but it’s not connected to resolving incoming requests for those permalinks. So you’ll need to modify your function to output the correct links, but also add a rewrite rule so WordPress knows what to do when those pages are requested. This is all … Read more

Post slider with custom post type

I don’t have enough rep to comment, but what does your actual query look like? Edit: I haven’t been able to test it, but I think this will work $args = array( ‘post_type’ => ‘slider’, ‘meta_key’ => ‘_thumbnail_id’, // only pull sliders with images ‘tax_query’ => array( array( ‘taxonomy’ => ‘slideshow’, ‘field’ => ‘slug’, ‘terms’ … Read more

drop-down list another query

Just a standard HTML form will do! <form action=”<?php echo home_url(“https://wordpress.stackexchange.com/”); ?>” method=”get”> <p><?php wp_dropdown_categories(‘taxonomy=taxonomy-1&name=taxonomy-1’); ?></p> <p><?php wp_dropdown_categories(‘taxonomy=taxonomy-2&name=taxonomy-2′); ?></p> <p><input type=”submit” value=”Search!” /></p> </form> Just replace taxonomy-1 and taxonomy-2 with the names of your taxonomies. Important If you registered your taxonomy with a custom query_var, you’ll need to match it in the name argument of … Read more

Adding Custom taxonomies to Press This panel

I assume you’re talking about Custom Post Type, not Custom Taxonomy. Right? If yes, add this code on your functions.php file: function press_this_ptype($link) { $post_type=”example”; $link = str_replace(‘post-new.php’, “post-new.php?post_type=$post_type”, $link); $link = str_replace(‘?u=’, ‘&u=’, $link); return $link; } add_filter(‘shortcut_link’, ‘press_this_ptype’, 11); Once you add the correct Post Type, WordPress will detect all taxonomies attached to … Read more

front end radio custom taxonomy with custom post type

Your code doesn’t show if and how you set $terms other then that its seems ok, just try to wrap it in an array and you should check if its set first, so try this: $new_post = array( ‘post_author’ => $user_id, ‘post_title’ => $post_title, ‘post_content’ => $post_content, ‘post_category’ => array($_POST[‘cat’]), ‘tags_input’ => array($tags), ‘post_type’ => … Read more