Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save digisavvy/62439f9505fae40e830987423efe3901 to your computer and use it in GitHub Desktop.
Save digisavvy/62439f9505fae40e830987423efe3901 to your computer and use it in GitHub Desktop.
Added brief how-to
<?php
/**
* The main archive template file
*
* @package kadence
*/
/**
* Step 1 - Duplicate index.php in the parent kadence theme and copy it to your child theme
* Step 2 - In your child theme, rename the index file to archive-{post-type-slug}.php where post type slug is your custom post type slug.
* Step 3 - Inside that new file from step 2, change the hook from do_action( 'kadence_archive' ); to do_action( 'your_custom_hook_name' );
* Step 4 - Go to Kadence Elements, create new element. Under Element Settings, in Placement, Choose Custom hook, and then henter the hook name
* from step 3 (just the text between single quotes).
* Step 5 - In Display Settings in Show On choose the Archive Template where the content should display. Save. Then see your content on that
* archive template
*/
namespace Kadence;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
get_header();
kadence()->print_styles( 'kadence-content' );
/**
* Hook for main archive content.
*/
do_action( 'ds_service_archive' );
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment