We are here to help during these difficult times. Use the coupon code STAYHOME2020 during checkout to receive 30% off the regular price!

Custom Archive Page

You are here:


This article is intended for developers. Coding experience is require, support is not provided at this level of customization. Before doing any custom work. Always backup your website and create a child theme to add custom code. See this article on how to create child themes

Creating a custom archive page

Make a copy of the archive.php file from your active theme directory as a starting point and place the copy in your child theme. That way they will inherit some of the theme’s html structure. Put this condition into your main block of html content. if( get_post_type() == 'epkb_post_type_1' ){ echo 'This is my Custom code for this post type archive'; //Test to see if condition works. } else { // Run Regular archive for regular posts. Put the other archive code here from your regular archive file. }  
Previous Current Theme vs KB Theme
Was this article helpful?
0.5 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 100%
How can we improve this article?
Need help?

Recent Articles

Table of Contents