Category Pages

You are here:
Table of Contents


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.


Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Need help?