swhcr.com

Wordpress Custom Post Type Archive Not Working

Home > Custom Post > Wordpress Custom Post Type Archive Not Working

Wordpress Custom Post Type Archive Not Working

Contents

Thanks a million. You're awesome!! :D Betty Permalink to comment# May 7, 2015 Can somebody help me? It shows all the posts like a main feed. Thank you so much for your help, snippet works great without WPML ;) Emilien Bart De Vuyst Permalink to comment# November 28, 2014 Hi Emilien, I got this fixed. this contact form

Can I reset a CSS property rather than overriding it? I was able to get everything working with this: function custom_post_archive($query) { if(!is_admin()) { if (!is_post_type_archive() && $query->is_archive()) $query->set( 'post_type', array('projects', 'nav_menu_item', 'post','team') ); remove_action( 'pre_get_posts', 'custom_post_archive' ); } } add_action('pre_get_posts', taxonomy-taxonomyname.php, the type of post a taxonomy lists is utterly irrelevant here –Tom J Nowell♦ May 15 '13 at 16:46 1 perfect, thanks @tom for your patience, in this thread How do you deal with a picky eater on a backpacking trip? 80s Sci-Fi movie with "fire-lion / fire-wolf" chasing people through locked steel doors Word to describe object that can

Wordpress Custom Post Type Archive Page Not Found

How do I get the last lines of dust into the dustpan? Elshereef Permalink to comment# September 30, 2012 Daan's Solution works perfect. How to connect two parabolic paths in TikZ? Help Center Envato Market Terms Author Terms Envato Market Licenses Contact Envato Join our Community Home Forums Become an Author Community Meetups Become an Affiliate Email Newsletters Sign up for new

If you just added a custom post type, you will need go to Permalinks page and press Save. Browse now From logo design to video animation, web development to website copy; expert designers, developers and digital talent are ready to complete your projects. Should I have doubts if the organizers of a workshop ask me to sign a behavior agreement upfront? Wordpress Custom Post Type Category Page Not Working It is built on WordPress, hosted by Media Temple, and the assets are served by MaxCDN.

Now it seems that archive.php is used. –Gab Feb 23 '13 at 20:36 Just want to make sure this point is clear: when you go to yoursite.com/?post_type=photos it renders Custom Post Type Archive Not Showing Countries where lecture duration does not exceed one hour Converting orbital state vectors from one origin to another Storing passwords in access-restricted Google spreadsheets? Topic Info In: How-To and Troubleshooting 9 replies 7 participants Last reply from: AngelEyes Last activity: 4 years, 11 months ago 3.1 Status: not resolved Topic Tagsarchive templatecustom post type Forum Restore your original permalink settings.

Why rotational matrices are not commutative? Custom Post Type Archive Link Rename (or copy) your archive-photos.php to taxonomy-genre.php and I bet you'll see what you expect. –Matthew Boynes Feb 23 '13 at 20:51 | show 1 more comment 1 Answer 1 active For example, which post type archive template would be used in these scenarios: A taxonomy that contains 2 types of post type, people and locations. In this case taxonomy-recipecategry.php share|improve this answer edited May 15 '13 at 16:44 answered May 15 '13 at 13:53 Tom J Nowell♦ 22.3k32672 Thanks, good improvement, the recipe is

Custom Post Type Archive Not Showing

Your taxonomy, courses_category, has a rewrite slug of course, so your taxonomy archive template will be taxonomy-courses.php. All are working fine except archive page. Wordpress Custom Post Type Archive Page Not Found Where do the white lines come from in my composite? Cpt Ui Archive Page I'll make sure to try another one next time, but i'm afraid i'm stuck with it for now (i've already added tons of content, if i remove the post types i

It worked a treat. weblink Would it fall back to archive-location.php or archive-people.php? DoublyLinkedList Implementation Java `\left \{` fitting a box (not centered) Missed A Connection The relationship between flat vector bundle and flat projective bundle How do you combine the elements in Sheldon's I'm not sure my code will reflect exactly what you needed to do, but it should be easy enough to adapt. Archive Page Not Working Wordpress

but I'm still confuse on this, actually I thought if I view the single category example, it will use the archive-recipe.php that I created, but instead its still using the archive.php. Contact About Archives Advertise Guest Posting License Shop Subscribe RSS What am I missing here? http://swhcr.com/custom-post/wordpress-custom-post-type-url-not-working.html I have a page called archive-galactic_gallery.php and my gallery posts, when I click on a tag or a category, are not going there.

Here's the code: register_post_type( 'recipe', array( 'label' => 'Recipe', 'description' => 'This is a Recipe Custom Post Type', 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'capability_type' => 'post', 'hierarchical' Custom Post Type Archive Url Thanks for the tip Mike and Vinod. That did the trick.

Trigger on CaseComment Simplify list of rules Shortest path between two points with n hops North by North by North by South East Taxing GoFundMe Donations What power do I have

Have you taken the WordPress 2016 Survey yet? How do we show that the function which is its own derivative is exponential? taxonomy-taxname.php is for the taxonomies. Archive For Custom Post Type Grant Permalink to comment# February 4, 2014 you save me me Jon, thanks a lot.

Simplify list of rules What does the letter 'u' mean in /dev/urandom? Here is my code: function namespace_add_custom_types( $query ) { if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { $query->set( 'post_type', array('nav_menu_item', 'post', 'post_type_1', 'post_type_2', 'post_type_3', 'post_type_4', 'post_type_5', 'post_type_6', 'post_type_7') ); The page archive is ok (show all posts with the same tag or date) Is there a way to use the widgets when there are only custom posts? his comment is here This site is not affiliated with the WordPress Foundation in any way.

What do you use page template for? 5 years ago in thread Custom post type category (archive) page not working Search forums Search Active threads New Badges 2 replies, last by Have you contacted the WPML support team? Not the answer you're looking for? asked 3 years ago viewed 6360 times active 8 months ago Upcoming Events 2016 Community Moderator Election ends in 6 days Blog How We Make Money at Stack Overflow: 2016 Edition

Here is my code to register the post type: add_action('init', 'event_register'); function event_register() { $labels = array( 'name' => _x('Events', 'post type general name'), 'singular_name' => _x('Event', 'post type singular name'), If so, then you need to make the taxonomy hierarchical. Thanks Ana!!! Not the answer you're looking for?

function namespace_add_custom_types( $query ) { if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { $query->set( 'post_type', array( 'post', 'nav_menu_item', 'your-custom-post-type-here' )); return $query; } } add_filter( 'pre_get_posts', 'namespace_add_custom_types' ); Reply Is anyone else facing the same issue ? For what it may be worth, we don't have any direct hand in this topic with CPTUI, we just get the post types/taxonomies registered and WordPress core would be handling the Where I have been running into problems is on an archive page for a custom post type.

Thanks, Reply ↓ Mark Permalink to comment# March 20, 2015 This was very helpful, thanks! no rewrites), and/or reset permalink settings? –Chip Bennett May 15 '13 at 13:01 Added the code on edit, I tried the default permalink and looks like its working as