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.
Link to your site please.
Brad Dalton has written 1910 tutorials & 4000+ Code Snippets for Genesis & WordPress – Not For Hire.
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.
Subscribe to get early access to new themes, discounts and brief updates about what's new with StudioPress!