• 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 post type template

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 › General Discussion › Custom post type template

This topic is: resolved

Tagged: Custom fields, Custom Post Type

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 6 months ago by elan42.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 4, 2017 at 7:37 am #214241
    elan42
    Member

    Hello,
    I'm developing a website trough the Genesis Sample child theme.

    I have registered a custom post type 'projects' and defined a few custom fields (both by using the Toolset plugin).

    Now, I'm trying to write a template for this post type. This is what my single-projects.php file looks like:

    <?php
    genesis();
    
    echo('<div class="clientBox">' . types_render_field( 'cliente' ) . '</div>');
    
    echo('<div class="linkBox">' . types_render_field( 'link' ) . '</div>');
    
    echo('<div class="snapshotBox">' . types_render_field( 'snapshot' ) . '</div>');
    
    ...

    When previewing or publishing a 'project' post, I can correctly see all the custom fields, but at the bottom of the page (below the footer), or at the top (placing genesis() after my code). I would like them to be in the main article of the page, that is hooked to genesis_entry_content (according to a visual guide I'm looking at).

    Can you help me understand what am I missing? Thank you

    December 4, 2017 at 8:06 am #214244
    Brad Dalton
    Participant

    Try this example https://wpsites.net/web-design/add-custom-field-to-genesis-loop/


    Tutorials for StudioPress Themes.

    December 4, 2017 at 8:24 am #214245
    elan42
    Member

    I had tried that (adding an action with the genesis_entry_content hook), but... It looks like the priority was too low (I didn't specify '20'). Now is working, thank you!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom post type template’ is closed to new 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