Change the “Allow comments” text for admin edit screen for custom post type?

You can fire filter hook gettext ( example available too ) to change default text Allow comments. in admin edit screen. Here another sample function: add_filter( ‘gettext’,’wpse221235_change_admin_cpt_text_filter’, 1, 3 ); function wpse221235_change_admin_cpt_text_filter( $translated_text, $text, $domain ) { global $typenow; if ( is_admin() && ‘Allow comments.’ == $text && ‘your-post-type’ == $typenow ) $translated_text = __( … Read more

Remove custom post type slug but keep related category taxonomy permalink

When registering your custom post type have you tried to disable with_front in your rewrite array? For example, using an example for the post type book: add_action( ‘init’, ‘codex_book_init’ ); /** * Register a book post type. * * @link http://codex.wordpress.org/Function_Reference/register_post_type */ function codex_book_init() { $labels = array( ‘name’ => _x( ‘Books’, ‘post type general … Read more

Custom Post Type Taxonomy – Permalinks generating, but posts not found

Your previous edit was a bit closer. Change the post type rewrite slug to: cosmetics/treatments/%treatment-type% Then change all instances of %type% to %treatment-type% in the treatment_permalink function. Everything should then work correctly after you flush rewrites. For future reference, the Monkeyman rewrite analyzer plugin is very helpful for debugging rewrite rules. As I mentioned, you … Read more

Custom Post Type tag taxonomy “Page Not Found”

So, it looks like I didn’t understand how a custom taxonomy works. http://joshrodg.com/hallmark/letters/tags/moore/ should be http://joshrodg.com/hallmark/tags/moore/ and http://joshrodg.com/hallmark/letters/tags/kenya/ should be http://joshrodg.com/hallmark/tags/kenya/. My mistake was that I expected the tags to be linked off my custom post type url, and not my main domain. I found the answer here: Archive template for taxonomy terms Thanks, Josh

Conditional posts in WP_query for search

What about removing the if statement, and combining the queries into something like this: ‘meta_query’, array( ‘relation’ => ‘OR’, array( array( ‘relation’ => ‘AND’, array( ‘key’ => ‘am_get_recurring_count’, ‘compare’ => ‘=’, ‘value’ => ‘0’, ), array( ‘relation’ => ‘OR’, array( ‘key’ => ‘am_enddate’, ‘compare’ => ‘>=’, ‘value’ => $currentdate, ), array( ‘key’ => ‘am_enddate’, ‘compare’ … Read more