• 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

webmonkey

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 15 posts - 21 through 35 (of 35 total)
← 1 2
  • Author
    Posts
  • April 29, 2013 at 2:59 pm in reply to: Site broken after Genesis Custom Code edit #38464
    webmonkey
    Participant

    Wendy you rock. The custom code file is found here: /wp-content/uploads/prose/custom.php

    Brad, thanks for chipping in!

    April 28, 2013 at 12:50 pm in reply to: Site broken after Genesis Custom Code edit #38252
    webmonkey
    Participant

    Doesn't make any difference. That file doesn't store content either:

    `<?php
    /**
    * This file controls the creation and inclusion of the custom.php file.
    *
    * @package Prose
    * @author StudioPress
    * @since 1.5.0
    */

    /**
    * Return the full path to the custom.php file for editing and inclusion.
    *
    * @uses prose_get_stylesheet_location()
    *
    * @since 1.5.0
    *
    */
    function prose_get_custom_php_path() {

    return prose_get_stylesheet_location( 'path' ) . 'custom.php';

    }

    /**
    * Helper function that will create custom.php file, if it does not already exist.
    *
    * @uses prose_get_custom_php_path()
    *
    * @since 1.5.0
    *
    */
    function prose_create_custom_php() {

    if ( file_exists( prose_get_custom_php_path() ) )
    return;

    $handle = @fopen( prose_get_custom_php_path(), 'w' );
    @fwrite( $handle, stripslashes( "<?php\n/** Do not remove this line. Edit functions below. */\n" ) );
    @fclose( $handle );

    }

    /**
    * Helper function that will create custom.php file, if it does not already exist.
    *
    * @uses prose_get_custom_php_path()
    *
    * @since 1.5.0
    *
    */
    function prose_edit_custom_php( $text = '' ) {

    /** Create file, if it doesn't exist */
    if ( ! file_exists( prose_get_custom_php_path() ) )
    prose_create_custom_php();

    /** Now that it exists, write text to that file */
    $handle = @fopen( prose_get_custom_php_path(), 'w+' );
    @fwrite( $handle, stripslashes( $text ) );
    @fclose( $handle );

    }

    add_action( 'after_setup_theme', 'prose_do_custom_php' );
    /**
    * PHP require the custom.php file, if it exists.
    *
    * @uses prose_get_custom_php_path()
    *
    * @since 1.5.0
    *
    */
    function prose_do_custom_php() {

    if ( ! is_admin() && file_exists( prose_get_custom_php_path() ) )
    require_once( prose_get_custom_php_path() );

    }`

    April 28, 2013 at 12:36 pm in reply to: Site broken after Genesis Custom Code edit #38248
    webmonkey
    Participant

    This is what's in the Prose functions.php file

    `<?php
    /*
    WARNING: DO NOT edit this file under any circumstances.
    Please do all PHP modifications via the Custom Code admin menu.
    */

    /**
    * This file calls the init.php file for both Genesis and Prose.
    *
    * It initializes the Genesis framework, and loads the Prose library as well.
    *
    * This file is a core Prose file and should not be edited.
    *
    * @author StudioPress
    * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
    * @link http://www.studiopress.com/themes/genesis
    */

    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );
    require_once( get_stylesheet_directory() . '/lib/init.php' );

    prose_create_custom_php();`

    Uploading a new one doesn't change anything. I searched the SQL database for words I knew were in there, but no luck. So where is Prose/Genesis storing the Custom Code you can add through the Genesis menu.

    April 28, 2013 at 12:31 pm in reply to: Site broken after Genesis Custom Code edit #38245
    webmonkey
    Participant

    Prose doesn't store its Custom Code in the functions.php but it must store it somewhere.

    March 28, 2013 at 5:37 pm in reply to: New image sizes not showing up in Genesis Featured Widget #31859
    webmonkey
    Participant

    Thanks both of you. 🙂

    That worked fine. Does that mean it's a bug in Prose?

    March 27, 2013 at 12:35 pm in reply to: New image sizes not showing up in Genesis Featured Widget #31579
    webmonkey
    Participant

    Can anyone help me with this? The client site needs to go live soon.

    March 22, 2013 at 10:58 am in reply to: New image sizes not showing up in Genesis Featured Widget #30464
    webmonkey
    Participant

    Nice thinking but sadly that did not work. I adjusted them manually. I think that was a feature of copying and pasting in the forum.

     

    Yes, the Custom Code thing in Prose is the equivalent of the Functions.php. Prose's one says:

    WARNING: DO NOT edit this file under any circumstances.

    Please do all PHP modifications via the Custom Code admin menu.

    March 22, 2013 at 10:12 am in reply to: Listing posts in Category index pages 2 across #30454
    webmonkey
    Participant

    Dorian,
    Thanks a lot. That's a pretty amazing plugin for the functionality it quickly adds. Bill FTW.

    There are three things I need to do to make this work visually.

    1. I was wanting to reverse the order of the Title and Featured Image. Default is Title first then Image, which creates alignment problems if the title stretches to two lines, eg. http://66.147.244.62/~grapefr3/gallery/paperback-pulp-art

    2. I wanted to ditch the Excerpt on these index pages. Presumably that can just be done via CSS selector for each of the category index pages? Is there a better way?

    3. I was wanting to add custom fields (eg. artist name and artwork price). Presumably that would be done in Genesis Simple Hooks as I've done for individual pages, but set to trigger on Category Index pages? Am I on the right track here?

    Cheers

     

    February 2, 2013 at 5:38 pm in reply to: Right aligning a slider in Prose/Recommended slider plugins? #17485
    webmonkey
    Participant

    My bad, your suggestion totally worked. I had read that as "in the content" not "before the content". Thanks so much John!

    February 2, 2013 at 5:31 pm in reply to: Right aligning a slider in Prose/Recommended slider plugins? #17483
    webmonkey
    Participant

    That's not wide enough, it's just the #content column and I need it across #content and #sidebar both.

    This is where I'm trying to get it (spanning #content and #sidebar):
    http://grapefruitmoongallery.com/reloaded/wp-content/uploads/2013/02/desired-slider-location.png.

    Just to be clear, #content-sidebar-wrap does or doesn't include #sidebar-alt? I think it does, as when I have the slider in that space, it also pushes down the left column a.k.a. #sidebar-alt.

    February 2, 2013 at 5:21 pm in reply to: Right aligning a slider in Prose/Recommended slider plugins? #17477
    webmonkey
    Participant

    Thanks John, those are helpful resources.

    I guess the problem I'm having is that I have a three column site, and want the slider at the beginning of two of them.

    I thought that the #content-sidebar-wrap would work, so those two columns move down when the slider is at the top of them (but #sidebar-alt remains unmoved).

    However, the only hook available seems to be "genesis_before_content_sidebar_wrap", which StudioPress describes as "execut[ing] immediately before the div block that wraps the content and the primary sidebar (outside the #content-sidebar-wrap div)." This moves all three columns, #sidebar, #sidebar-alt and #content.

    Web design was way easier back in the day of tables. This CSS positioning stuff is painful.

    January 31, 2013 at 11:03 pm in reply to: sidebar widget background help #16992
    webmonkey
    Participant

    sad no one responded.

    January 8, 2013 at 4:23 pm in reply to: Making a custom field appear in a post #10474
    webmonkey
    Participant

    Thanks Bill, bit of solution crossover here. Here's what ended up working:

    1. <?php
    2. if( genesis_get_custom_field( 'CUSTOMFIELDNAME' ))
    3. echo 'Artist: ' .genesis_get_custom_field( 'CUSTOMFIELDNAME' ).;
    4. ?>

    This returns
    Artist: CUSTOMFIELDVALUE
    on a page

    In the Nick the Greek tutorial, where this code was taken from, please note that the second close bracket on line 2 above is missing. The above code is correct.

    How I Make Custom Fields Easier in Genesis

    January 8, 2013 at 3:02 pm in reply to: Making a custom field appear in a post #10448
    webmonkey
    Participant

    Thanks Bill.

    You say:

    Make $post global and use the function genesis_get_custom_field(), as in genesis_get_custom_field( ‘myfield’ )

    I didn't understand the "Make $post global" part. Assuming a custom field is called custom-field1, and I want the page to return:

    Label: [custom-field1 value]

    ...does this look about right?

    <?php
    $custom-field1 = genesis_get_custom_field ('custom-field1');
    echo "Label: " .$custom-field1[0]. ;
    ?>

    January 5, 2013 at 7:38 pm in reply to: Making a custom field appear in a post #9829
    webmonkey
    Participant

    Thanks anitac, but that was the impenetrable WordPress Codex page I was talking about. I've worked down that page trying all the various codes in various permutations with no luck at all.

    WordPress' Codex has some ridiculous blindspots, probably because the codex is written by programmers and not technical writers.

    Notice that on this specific page, there's no simple copy and paste code snippet in the entire page that returns a single custom field when placed in a template. The page instead starts with a minimalist post_meta command—which does nothing as is that I can see—and then skips to advanced and legacy uses, assuming a bunch of knowledge that isn't linked.

    My favorite part on that page is:
    <?php echo get_post_meta($post->ID, 'key', true); ?>
    will echo the value for a single key as a string wherever it is used in a template file.

    No it doesn't.

    <?php $key="mykey"; echo get_post_meta($post->ID, $key, true); ?> also fails even though gfm-artist is the custom field name.

    I've tried a bunch of stuff like

    <?php $test = get_post_meta($post->ID, 'gfm-artist', TRUE); ?>
    <?php if($test!="") echo $test; ?>

    Nothing doing. This is the kind of stuff in other CMSes that is dealt with by adding a shortcode like "$gfm-artist$" to a template and you're done. I can't believe it's this difficult and this badly documented.

    Literally days of trying to get this ridiculously simple thing working. I am amazed at the Google fail on this simple issue. Help on the first few pages of Google searches for "display custom field wordpress" is either for legacy WP versions or similarly impenetrably written.

    And hey, StudioPress: the CODE HTML tag in this forum gets confused if you post code with tags. LT and GT angle brackets break the posts, unless you put > etc

  • Author
    Posts
Viewing 15 posts - 21 through 35 (of 35 total)
← 1 2
« Previous Page

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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