Adding CPT changes entire layout of my site except for the archive of that CPT
Adding CPT changes entire layout of my site except for the archive of that CPT
Adding CPT changes entire layout of my site except for the archive of that CPT
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
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
Featured image in custom post is being disabled
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
Insert single CPT items every x posts of another CPT
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
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
FYI, the Portfolio Category in your website is called Custom Taxonomy. You will need a function called get_terms() which takes two params are the taxonomy you will get and an array. It will return an array of terms. Just surf the codex about that. After get the terms, you can use a foreach loop to … Read more
As I see it, since “incubators” is a way for you to group “startups”, “incubator” should be a taxonomy of a “startup” custom post type. Make sure, when you register your taxonomy, to specify the link between the two. register_taxonomy( ‘Incubator’, array( ‘startup’ ), $args ); You can enter details to describe your incubator by … Read more