How To Create a Single Custom Post Type Template for Genesis in WordPress

Published Date Author: , Posted October 21st, 2017 at 8:37:25am

wordpress/wp-content/themes/yourTheme/single-yourCPTslug.php

1
2
3
4
5
6
7
8
9
10
11
add_action( 'genesis_before_entry_content', 'display_custom_fields' );
function display_custom_fields() {
    $jobTitle = get_field('_jobTitle') ?: '-';
    print <<<EOT
    <br style="clear:both"/>
    <p>Job Title: $jobTitle</p>
EOT;
}
 
// Genesis Loop
genesis();
add_action( 'genesis_before_entry_content', 'display_custom_fields' );
function display_custom_fields() {
	$jobTitle = get_field('_jobTitle') ?: '-';
	print <<<EOT
	<br style="clear:both"/>
	<p>Job Title: $jobTitle</p>
EOT;
}

// Genesis Loop
genesis();

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.