• 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

Customize entry content

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 › Customize entry content

This topic is: not resolved

Tagged: Custom fields

  • This topic has 8 replies, 2 voices, and was last updated 12 years, 9 months ago by sheilab.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • January 15, 2013 at 5:45 pm #12154
    sheilab
    Participant

    I have a client who would like a paragraph to the right of a slideshow for each of her posts.

    Can you point me in a direction as to how I could do this?   The slideshow can  be implemented with short code or as a widget. I could have her set up a different simple sidebar for each post but she is not that savvy and as the site grows, that would be lots of sidebars.

    Using Outreach 2 theme.

    http://www.bergmanmediaservices.com/project-2/

    January 15, 2013 at 6:38 pm #12166
    SoZo
    Member

    Are the paragraphs going to be unique to each post? If so I would pull the text from a custom field. Or if you are using a slideshow with shortcode then you could add the text right after the shortcode and float it.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 15, 2013 at 7:33 pm #12178
    sheilab
    Participant

    Thanks! Custom fields and CSS should work for me here. I have put this code into my functions.php file but am getting a syntax error and I just can't see it. Please advise.

    /* add custom fields smb*/

    if( genesis_get_custom_field( 'slideshow_shortcode' )
    echo '<div class="slideshow_shortcode">' . genesis_get_custom_field( 'slideshow_shortcode' ) .'</div>';

    if( genesis_get_custom_field( 'project_description' )
    echo '<div class="project_description">' . genesis_get_custom_field( 'project_description' ) .'</div>';

    January 15, 2013 at 7:34 pm #12179
    sheilab
    Participant

    When I submit a reply to this post, I am sent to a 404 page.

    January 16, 2013 at 12:11 pm #12350
    SoZo
    Member

    What is the syntax error and what else are you putting in functions.php?


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 16, 2013 at 7:23 pm #12502
    sheilab
    Participant

    I found the syntax error, I was missing the end parenthesis in my functions. I'm seeing the custom fields now but I still need help getting the slideshow short code to read as short code.   http://www.teripower.dev/project-2/

    This is the code in my functions.php file:

    /** Add custom fields to project category posts smb*/
    add_action( 'genesis_post_content', 'child_custom_field' );
    function child_custom_field() {
    if( genesis_get_custom_field( 'slideshow_shortcode' ))
    echo '<div class="slideshow_shortcode">' . genesis_get_custom_field( 'slideshow_shortcode' ) .'</div>';
    if( genesis_get_custom_field( 'project_description' ))
    echo '<div class="project_descriptione">' . genesis_get_custom_field( 'project_description' ) .'</div>';
    }

    I've played with adding parts of the code below to the code above and also tried wrapping parts of  it around the short code's custom field value when I define it in the post editor but can't get it right. The short code calls a slideshow. Should I post this as a new topic?

    echo do_shortcode("[Shortcode]");

    I'm getting closer.

    Thanks!

    Sheila

    January 17, 2013 at 12:20 pm #12664
    SoZo
    Member

    If you want to enter the shortcode into the custom field then you need to edit echo do_shortcode(“[Shortcode]“); and replace "Shortcode" with the custom field output. i.e. echo do_shortcode(“[. genesis_get_custom_field( ‘slideshow_shortcode’ ) .]“);


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 17, 2013 at 2:36 pm #12717
    sheilab
    Participant

    I have added the do_shortcode function to the echo command and have tried for hours to get rid of this parse error:

    Parse error: syntax error, unexpected '[' in /Users/bergman/Documents/Websites/www.teripower.dev/wp-content/themes/outreach/functions.php on line 81     (line 81 is the  echo do_shortcode  line for the slideshow_shortcode.)

    Please take a look and see what I'm doing wrong. Thanks.

    /** Add custom fields to project category posts smb*/
    add_action( ‘genesis_post_content’, ‘child_custom_field’ );
    function child_custom_field() {

    if( genesis_get_custom_field( ‘slideshow_shortcode’ ))
    echo do_shortcode(“[. genesis_get_custom_field( ‘slideshow_shortcode’ ) .]“);

    if( genesis_get_custom_field( ‘project_description’ ))
    echo ‘<div class=”project_descriptione”>’ . genesis_get_custom_field( ‘project_description’ ) .’</div>’;
    }

     

    January 24, 2013 at 4:51 pm #14438
    sheilab
    Participant

    This is the final working version of the code that worked for me:

    /** Add custom fields to project category posts smb. This works.*/
    add_action( 'genesis_post_content', 'child_custom_field' );
    function child_custom_field() {
    if( genesis_get_custom_field( 'project_description' ))
    echo '<span class="project_description">',
    genesis_get_custom_field( project_description ) ,'</span>';
    if( genesis_get_custom_field( 'slideshow_shortcode' ))
    echo '<span class="slideshow_shortcode">', do_shortcode(''. genesis_get_custom_field( 'slideshow_shortcode' ) .''),'</span>';
    }

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