Going Green theme questions

Community Forums Forums Design Tips and Tricks Going Green theme questions

This topic is: not resolved

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

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

    Sundancer
    Participant
    Post count: 14

    I’m in the process of transferring my site from WordPress.com to a self-hosted site. I’m developing the site with a new theme “Going Green” on my local computer, using Instant WordPress — so I don’t have a website link for anyone to check out my material. Sorry!

    I’m very much a newbie in dealing with code. I’ve managed to make php and css changes to install an author’s box, and relocate the primary menu from above the header to below, and change its background color to match the wrap-top color.

    My questions are:

    1) This theme uses unique feature images just below the titles of posts. It does not use feature images the same way on pages. Is there a way I can get unique feature images to be used the same way on both posts and pages?

    If not, can I instead insert all feature images below the header and above the primary menu (a different image on every page)?  It is set up this way on my Twenty-Eleven WordPress.com site: SquareFootAbundance.com

    2) How can I insert a widget in my sidebar to show a feature video? I don’t see any widgets for images or videos (boo!).

    Thanks a bunch!

    #22189

    cehwitham
    Participant
    Post count: 396

    I think this is the section in functions.php you need to edit:

    add_action( 'genesis_post_content', 'goinggreen_post_image_single', 5 );
    /**
    * Add featured image to single posts
    */
    function goinggreen_post_image_single() {
    if ( ! is_singular( 'post' ) )
    return;
    $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    printf( '%s', get_permalink(), the_title_attribute( 'echo=0' ), $img );
    }

    Try changing it to:

    add_action( 'genesis_post_content', 'goinggreen_post_image_single', 5 );
    /**
    * Add featured image to single posts
    */
    function goinggreen_post_image_single() {
    if ( ! is_singular( 'post' ) && ! is_page() )
    return;
    $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    printf( '%s', get_permalink(), the_title_attribute( 'echo=0' ), $img );
    }

    I’ve not tested this code as I don’t have the theme installed but essentially you’re changing the IF statement to allow for pages and single posts.

    Remember you’ll need to set featured images for your pages.

    Widgets can be added by plugins. On WordPress.com some widgets are added for you like images. This is not a problem with Genesis this is to do with you not having plugins installed on your self hosted site. I recommend trying the following plugins:

    http://wordpress.org/extend/plugins/image-widget/

    http://wordpress.org/extend/plugins/video-sidebar-widgets/


    Twitter: cehwitham Web: cehwitham.com

    #23783

    Sundancer
    Participant
    Post count: 14

    cehwitham,

    Thanks for taking the time to provide suggestions for me, and I’m sorry for taking so long to respond. I’ve been swamped this week with far too many other projects!

    I tried using your suggested code changes, and it didn’t work. I fiddled around with it several times, but I just kept getting parse error messages, like  “unexpected &”. I decided to just manually insert the featured images at the top of each page instead. It doesn’t look exactly the same, but it’s good enough for now.

    The plugins for the image and video widgets are great.  Thanks!

    #24520

    cehwitham
    Participant
    Post count: 396

    Gad you found a work around in the end. Sorry the code didn’t work out for you.


    Twitter: cehwitham Web: cehwitham.com

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

You must be logged in to reply to this topic.