Community Forums › Forums › Archived Forums › Design Tips and Tricks › Going Green theme questions
- This topic has 4 replies, 3 voices, and was last updated 9 years, 5 months ago by kradke.
-
AuthorPosts
-
February 21, 2013 at 11:31 pm #22151SundancerMember
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!
February 22, 2013 at 4:52 am #22189cehwithamMemberI 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
March 2, 2013 at 12:31 pm #23783SundancerMembercehwitham,
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!
March 6, 2013 at 6:14 am #24520cehwithamMemberGad you found a work around in the end. Sorry the code didn't work out for you.
Twitter: cehwitham Web: cehwitham.com
October 21, 2014 at 2:52 pm #128685kradkeMemberYou said here that you moved your menu below the header with the Going Green Pro theme. I did the same and the menu now does not show up on mobile devices. Did you have this issue?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.