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() […]
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 […]
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 […]
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?
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?
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); […]
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 http://memstories.com and the CPT is “Events”. I already found some mentions of a thread on WP Support (https://wordpress.org/support/topic/show-the-posts-published-before-a-specific-date?replies=2#post-1066144), but […]
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 […]
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 […]
domain.com/rents/miami-dade/ domain.com/companies/miami-dade/ 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: domain.com/rents/miami-dade/ 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 […]