Forum Replies Created
-
AuthorPosts
-
jmrallenMember
You can disregard the coding above, although I'm still trying to find a solution to the issue. I've continued to modify the site trying to find workarounds, so that code's largely not current. I tried to modify those two forum posts, but I couldn't find a way to do it to remove the code.
StudioPress support emailed me saying that there is a solution to this, but they don't have the code ready for copy/paste to send over. So, I'm either beholden to the community here or need to find one of their approved designers to help on a paid basis. I'm not necessarily opposed to that, so long as there's some reassurance that it's not a decades-long process that's billed by the hour. 🙂
jmrallenMemberI made some more customizations to the theme today, and I noticed that the grid loop plugin didn't exactly do what I'd hoped. It definitely got the grid setup on the front page's main content area, but all of the single entries ended up having the grid applied to their sidebar area. I've no idea why, so I think I'm back to square one in my need to figure out how to code this in functions.php and front-page.php. I'll keep everyone posted as I tinker and discover more. And, as always, if any of the grid and functions experts here want to chime in, I'm completely open to guidance.
jmrallenMemberI installed the Genesis Grid Loop plugin by Bill Erickson and got the approximate intended effect on the homepage (see it here). I therefore know this is possible. However, I have no idea how to code this same functionality using functions.php and front-page.php rather than the plugin. Is there anyone out there who can help? I just don't know enough about reading code to figure it out on my own.
I would prefer to not use the plugin for two reasons: it's not been tested with Genesis 2.0, so something's bound to be not quite right, and I'd like to minimize the number of plugins in general. Any assistance this community can provide would be most appreciated. Once I get the functionality dialed in, I think I should be able to take the styling from there.
jmrallenMemberI'm not sure about that last bit. My guess would be that it does process a bit more quickly, since it's not having to load a plugin, but that's a total guess. We'll have to wait for the pros to weigh in.
jmrallenMemberGenerally speaking, the fewer plugins you use the faster the site. So, if you can add the code in your functions.php file you're probably better for it. Personally, I'm not that code-savvy to achieve some of the things I want to achieve with respect to positioning, so I use simple hooks. But all things being equal, I'd love to use them just in functions.php -- I just don't know how. 🙂
jmrallenMemberThis wouldn't make the image clickable, but have you considered making the image be the background image for that header div via CSS? You could tell it to align right, and maybe that would give you more control over spacing for the search box.
jmrallenMemberAfter more searching, I found a great post by Bill Erickson about the grid loop that discussed using "one-third" to determine how columns are displayed (in that case, a three-column layout). For the life of me, I can't figure out how to keep one-third from meaning "one third of the entire page" rather than "one-third of the specific space I'm trying to fill."
I tried getting the grid appear just in a specific div, but I kept failing miserably. Again, I'm positive this is just my coding inabilities at work.... I'm now fairly certain there's a solution, and it's just a matter of me not knowing how to achieve it. I'm hoping someone here knows how to pull this off in HTML5 / Genesis 2.0.
jmrallenMemberIt occurred to me that I failed to include the front-page.php info. I currently have the area setup as a widget and am making the content appear in a single column via the Featured Widget Amplified plugin. If I can get the grid system working in that area, then I could simply un-register that widget from the homepage. Anyway, I'm obviously more of a content guy than a code guy, so I really appreciate the help from this community. Here's hoping that what I want to achieve is actually feasible. Here's the front-page.php code I'm currently using:
<?php
//* Enqueue scripts
add_action( 'wp_enqueue_scripts', 'minimum_front_page_enqueue_scripts' );
function minimum_front_page_enqueue_scripts() {//* Load scripts only if custom background is being used
if ( ! get_background_image() )
return;//* Enqueue Backstretch scripts
wp_enqueue_script( 'minimum-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'minimum-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'minimum-backstretch' ), '1.0.0' );
wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => get_background_image() ) );//* Add custom body class
add_filter( 'body_class', 'minimum_add_body_class' );}
//* Minimum custom body class
function minimum_add_body_class( $classes ) {
$classes[] = 'minimum';
return $classes;
}//* Add widget support for homepage if widgets are being used
add_action( 'genesis_meta', 'minimum_front_page_genesis_meta' );
function minimum_front_page_genesis_meta() {if ( is_home() ) {
//* Remove entry footer functions
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );//* Force full width content layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );}
if ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
add_action( 'genesis_before_content', 'sc_home_do_featured' );
add_action( 'genesis_before_content', 'sc_home_do_middle' );
}}
// Home feature widget section
function sc_home_do_featured() {if ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) ) {
echo '<section id="home-featured" class="clearfix"><div class="wrap">';
genesis_widget_area( 'home-featured-full', array(
'before' => '<main class="home-featured-full">',
'after' => '</main>',
) );echo '<section id="home-featured-halves">';
genesis_widget_area( 'home-featured-left', array(
'before' => '<aside class="home-featured-left one-half first">',
'after' => '</aside>',
) );genesis_widget_area( 'home-featured-right', array(
'before' => '<aside class="home-featured-right one-half">',
'after' => '</aside>',
) );echo '</section><!-- end home-featured-halves --></div><!-- end wrap --></section><!-- end home-featured -->';
}
}// Home middle widget section
function sc_home_do_middle() {
if ( is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) ) {
echo '<section id="home-middle" class="clearfix"><div class="wrap">';
genesis_widget_area( 'home-middle-1', array(
'before' => '<aside class="home-middle-1 widget-area two-thirds first">',
'after' => '</aside>',
) );genesis_widget_area( 'home-middle-2', array(
'before' => '<aside class="home-middle-2 widget-area one-third">',
'after' => '</aside>',
) );echo '</div><!-- end wrap --></section><!-- end home-middle -->';
}
}//* Genesis grid loop
function minimum_grid_loop_helper() {if ( function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 0,
'feature_image_size' => 0,
'feature_content_limit' => 0,
'grid_image_size' => 0,
'grid_content_limit' => 250,
'more' => __( '[Read more]', 'minimum' ),
) );
} else {genesis_standard_loop();
}
}
//* Run the Genesis loop
genesis();jmrallenMemberThank you. Unfortunately, the "body" call does not work site-wide; the image only appears on the homepage using that default setting. I also tried body.category-sony and body.category-videogames-sony , and neither of those was able to specify the page on which it appeared.
jmrallenMemberWow, that worked like a charm. Thank you! If I can bother you with one more question: is there a way to code it so I could specify whether the background image appears on just the homepage, just internal pages, or on all pages of the site?
August 27, 2013 at 5:03 pm in reply to: Hook to Display WP-SEO Meta Between Headline and Entry Content? #59125jmrallenMemberFor the record, I "kinda sorta" found a way to get it to work, but it's between the headline and the date/byline info. Ideally I'd have it appear between the byline/date and the body copy. I may be SOL on this one, but I could live with it. My question at that point would be how to CSS style that specific text so it appears different from the body copy (say, in italics). How would I do that? Is there a way to style it differently from body copy, since it's a hook?
jmrallenMemberI have updated my site, Daily Game, to both WordPress 3.6 and Genesis 2.0. It's running an old theme that isn't even technically supported anymore, and everything still seems to be working just fine. I did not enable HTML5, but in terms of upgrading alone, it still works perfectly fine.
So, if you're concerned about upgrading to Genesis 2.0, doing the upgrade itself has been fine in my experience. It's when you get to enabling HTML5 where the CSS and other issues may crop up. I don't think you have to fear the upgrade itself or hold off until all the child themes have been updated. In actuality, they won't "all" be updated anyway, so you'd be waiting a long time.
jmrallenMemberI wonder if StudioPress can add a column to the Downloads page indicating whether it's been updated for Genesis 2.0. A simple Y/N would be helpful, since some of the themes currently are at version 2.0, which some people may think means "this is compatible with Genesis 2.0"
-
AuthorPosts