Customising single post template for a CPT with custom fields

Community Forums Forums Design Tips and Tricks Customising single post template for a CPT with custom fields

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  bongoman 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #117307


    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.


    Jon Schroeder

    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:

    The content of this file should look something like this:


    // your functions here, using hooks and filters



    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:



    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.



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

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.