• 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

Customising single post template for a CPT with custom fields

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 › Customising single post template for a CPT with custom fields

This topic is: not resolved

Tagged: CPT, genesis_entry_content, hooks

  • This topic has 3 replies, 3 voices, and was last updated 11 years, 3 months ago by bongoman.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 6, 2014 at 4:22 am #117307
    bongoman
    Member

    Hi there

    I'm getting a little tripped up on the best way to work with the Genesis hooks and filters.

    Specifically I have a custom post type with a bunch of custom fields and am currently working on the single post template for this CPT.

    At this stage I'm just basically adding my custom functions to display my custom fields to the genesis_entry_content hook.

    But I need to be more precise in my layout on this template. I'm wanting to use the genesis column classes but am a little unclear on how to do this. For example, I'm wanting to create a couple of columns and display the_content() in one, maybe with some custom fields in that same column, and to also display my other custom fields in a second column.

    Any suggestions on how to get started with this would be appreciated.

    August 7, 2014 at 4:41 pm #117664
    Jon Schroeder
    Member

    First, you'll want to be just editing this specific template. So the file to use would be something like single-yourposttype.php, and it should be located in the same folder as your child theme's functions.php file.

    More on that here: http://codex.wordpress.org/images/1/18/Template_Hierarchy.png

    The content of this file should look something like this:

    -------------------------------
    <?php

    // your functions here, using hooks and filters

    genesis();

    -------------------------------

    So far as using the Genesis column classes are concerned, there are lots of things you can do!
    Here's more information on using those: http://my.studiopress.com/tutorials/content-column-classes/

    August 7, 2014 at 8:47 pm #117693
    Brad Dalton
    Participant

    One solution might be to look at how the AgentPress theme and Listings plugin uses custom fields as they also output in columns and generate meta boxes on single CPT Edit screens.


    Tutorials for StudioPress Themes.

    August 10, 2014 at 4:49 pm #118109
    bongoman
    Member

    Thanks for the replies, much appreciated. Will look at the AgentPress theme, thanks!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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