Articles of archive template

Archive template for custom post type only lists first 10

Here is my template for It currently only shows the first 10 people. I’d like it to show everyone, not just the first 10 people. <?php get_header(); ?> <div id=”content” class=”clearfix row-fluid”> <div id=”main” class=”span12 clearfix” role=”main”> <?php if ( have_posts() ) : while (have_posts()) : the_post(); ?> <div class=”person-card”> <div id=”post-<?php the_ID(); ?>” […]

How to test pagination?

I’ve been building a theme from scratch so writing everything from nothing and every place I go online which teaches me how to implement pagination are mostly showing ways to make the standard WordPress version into a style one. I’ve also learnt there’s about 3 different paginations (Prev/Next, Archive Pages, Page Break) and I assume […]

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 […]

Custom Taxonomy Archive BUG

I’m hoping that Its just my tired eyes missing something and a fresh pair of eyeballs might catch what I’m missing. I have a custom taxonomy with a slug of ‘residential_project_types’ that is assigned to a custom post type of residential_projects. I want to display all terms from the taxonomy, outputting the term name and […]

How To Create A Custom Taxonomy 404 Page

I can’t seem to find any documentation on this and Google is only showing results for people who have 404 pages caused by their incorrectly implemented taxonomies. I want to show a custom 404 page for my custom taxonomy. I would hope that there would be a simple naming convention like with taxonomy-{taxonomyName}.php. Maybe something […]

Archive slider for CPT

I have a custom post type and archive page. I want to be able to use the default twentyfourteen theme slider so that the archive-cpt.php page calls the js and displays a slider only for the CPT. I imagine I call a function, but I don’t know how to write the script or how to […]

Custom query in archive.php with pagination nightmare

I want to run a custom query showing only subcategories of a specific category inside my archive.php with pagination. But, for some reason, it keeps counting (and paginating) by the number of post inside of all subcategories. ie: If my custom code says that I want 5 child cats per page and I have 10, […]

Double count view in archive.php

I’m having a hard time using this snippet I’m getting double views each time the post is queried. This is in my functions.php file: function getPostViews($postID){ $count_key = ‘post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘0’); return “0”; } return $count; } function setPostViews($postID) { $count_key = ‘post_views_count’; $count = get_post_meta($postID, […]

CPT: archive-cpt.php VS custom page template

I’ve created a CPT named portfolio. Now i want to create a page which will act as an INDEX for this CPT. Now i’ve two choices …. a) Make a custom template having custom WP_Query. In this way i can assign this template to any page and that page will work as an index. b) […]

Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy

I need help with WP custom taxonomy and custom post types. I never find a working solution so far. Please accept my apologies if this has a simple solution. I tried my best to find solution everywhere first. Explanation of issue – I have one taxonomy called “department”. I have 3 CPT called “course”, “faculty”, […]