• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Custom Single.php file for Custom Post Types

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Custom Single.php file for Custom Post Types

This topic is: not resolved

Tagged: Custom fields, custom post types

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 11 months ago by Nuro.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • August 19, 2013 at 11:07 am #57347
    Nuro
    Member

    Hi,

    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.

    Thanks!

    August 19, 2013 at 11:15 am #57351
    Brad Dalton
    Participant

    Link to your site please.

    Try this http://www.briangardner.com/portfolio-page/


    Tutorials for StudioPress Themes.

    August 19, 2013 at 11:46 am #57362
    Nuro
    Member

    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.

    Thanks!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble