Articles of custom post type archives

Conditional tags don't work

I’m trying to display different templates in archive.php page. I need to load different article display depending on custom post type. Here is my code: <?php if(is_singular(‘libri’)) :?> <?php // WP_Query arguments $args = array ( ‘post_type’ => ‘libri’, ); // The Query $query = new WP_Query( $args ); // The Loop if ( $query->have_posts() […]

Not able to see CPT archive template

I am not sure what I am missing here , the cpt archive page simply does not want to show. I reset permalinks ( currenlty on default ) , copied archive.php and renamed to archive-articles.php ( tested anything I could think of ) but the custom template does not want to show. It loads default […]

Archive list for custom post type categories

I am using a recipe plugin that uses a custom post type of ‘recipe’. I currently have multiple lists of recipes from each category on a page. I am trying to get the title of each category list to link to an archive list of those posts within each category. This is not working, and […]

Loop that displays the first post of every available custom post type?

Is it possible to create a loop that goes through all the available custom post types without statically defining what those custom post types are, and then displaying the featured image of the first post for each of those custom post types?

Have a Custom Post Type index page display taxonomy items instead of posts

I have a CPT registered that is called lessons with a custom taxonomy (category) that is called courses. I want the /courses page (archive-courses.php?) to display the individual courses (i.e. “online marketing”, “paid advertising”) and not the individual posts (lessons). Would this mean I’d just customize the loop, or a complete custom WP_Query?

Rewrite custom post type url's adding meta box values

I’ve got these custom post types (CPT) and meta boxes: Movies (CPT) Genre (Meta box) Genres (CPT) If one movie is called Die hard then I want the permalink to be: /genres/action/die-hard This is easily fixed by setting the movie-CPT to ‘rewrite’ => false and use this code instead: add_action(‘init’, ‘rb_add_rewrite_rules’); add_filter(‘post_type_link’, ‘rb_create_permalinks’, 10, 3); […]

How to make an archive page displaying posts in a date range

I’m trying to make a couple of Page Templates for different Pages that should act as an archive to display posts (a Custom Post Type actually) in a certain date range. The website it concerns is and the CPT is “Events”. I already found some mentions of a thread on WP Support (, but […]

“Edit” option for custom post types archive page

I have a custom post type archive page but I also need the user to be able to insert a bit of page text. I thought I could just use the_content() of the page but the edit link is gone from the admin menu for custom post types archive pages. Is this something new and […]

List all posts in Custom Post Type but group dynamically by Custom Taxonomies

I have a custom post type named “Resources” which has a Taxonomy named “Types.” I have it manually pulling each term which isn’t the most elegant solution and every time there is a new term added, I have to add it in manually. I need a way for the Terms to populate with the posts […]

How do I get the permalink structure to work like this? Then for, say rents/miami-dade/ I would loop through some different areas within miami, showing a list of rents for each area. For example: would render something like this by looping through the areas in Miami: North Miami Beach rents table Hialeah rents table Cutler Ridge rents table I’d need to mimic the […]