Skip to content

Instantly share code, notes, and snippets.

<?php
/*********************************************
Contests CPT
**********************************************/
/* Contest CPT :: Initiate CPT
**********************************************/
function vs_register_contests_post_type() {
<?php
/*********************************************
OBJECTIVE
**********************************************
The goal is to create either a series of archive templates
OR a function called by shortcode that will display a list
of CPT entries based on the assigned custom taxonomy.
The CPT code below (functions.php) works. What I cannot
<?php
/**
* Blog Archive Body Class
*
*/
function pf_blog_archive_body_class( $classes ) {
$classes[] = 'blog-archive';
return $classes;
}
Menu Heirarchy
*********************
Contests // PAGE: Explain how/why of contests. URL: tld.com/contests
Current Contests // Taxonomy Archive (current) URL: tld.com/contests/current
Archived Contests // Taxonomy Archive (archived) URL: tld.com/contests/archive
Contest Rules // PAGE: Explains contest rules. URL: tld.com/contests/rules
Contest XYZ // PAGE: Details of Contest XYZ URL: tld.com/contests/contest-xyz
/*********************************************
Contests CPT
**********************************************/
/* Contest CPT :: Initiate CPT
**********************************************/
function be_register_contest_post_type() {
$labels = array(
'name' => 'Contests',
/*
* Modify Author Archive
*/
remove_action( 'genesis_before_loop', 'genesis_do_author_title_description', 15 );
add_action( 'genesis_before_loop', 'sk_display_starbox', 15 );
function sk_display_starbox() {
if ( ! is_author() ) {
return;