how do I create a custom single.php file for my custom post types. My custom post type is “reaction”, so have created single-reaction.php, but not sure how to add the code below, which should display after the content:
<p><?php the_field(‘reaction_discussion’); ?></p>
<div><?php the_field(‘reaction_table’); ?></div>
I’ve seen/read tutorials for page templates but not for the single.php files.
I haven’t uploaded it yet… using MAMP.
<?php /** * The custom portfolio post type single post template */ /** Remove the post info function */ remove_action( 'genesis_before_post_content', 'genesis_post_info' ); /** Remove the author box on single posts */ remove_action( 'genesis_after_post', 'genesis_do_author_box_single' ); /** Remove the post meta function */ remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); ?> <p><?php the_field('reaction_discussion'); ?></p> <div><?php the_field('reaction_table'); ?></div> <?php genesis();
This works except it shows the custom field content above the header… Any tips on getting it right behind the content. Tried different hooks but couldn’t get it to work.
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.