Forum Replies Created
-
AuthorPosts
-
pglessMember
No worries, it was a pure css problem, which I have managed to fix by creating a separate css file for the front page. thx
pglessMemberDid the above, it didn't work for me. Is there anything else that needs to be done?
pglessMemberFinally worked it out.
Here is the full solution for those of you wanting to do the same for the minimum theme.
Did a search and found this useful site: http://www.carriedils.com/add-slider-minimum-theme - did I say this was really useful.
1. Register a widget area - add the following code to your functions.php
/** Register widget area */ genesis_register_sidebar( array( 'id' => 'home-slider', 'name' => __( 'Home Slider', 'minimum' ), 'description' => __( 'This is the home slider', 'minimum' ), ) );
2. Search for the following and replace with the code in 3.
/** Add the featured image section */ add_action( 'genesis_after_header', 'minimum_featured_image' ); function minimum_featured_image() { if ( is_home() ) { echo '<div id="featured-image"></div>'; } elseif ( is_singular( array( 'post', 'page' ) ) && has_post_thumbnail() ){ echo '<div id="featured-image">'; echo get_the_post_thumbnail($thumbnail->ID, 'header'); echo '</div>'; } }
3. Add the widget areas to your pages (home and single pages) - add the following code to functions.php
/** Add the featured image section */ add_action( 'genesis_after_header', 'minimum_featured_image' ); function minimum_featured_image() { if ( is_home() ) { echo '<div id="home-featured"><div class="wrap">'; genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); echo '</div></div>'; } elseif ( is_singular( 'page' ) ) { echo '<div id="home-featured"><div class="wrap">'; genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); echo '</div></div>'; } }
This solution replaces the big image on the home page with Genesis Responsive Slider. If you wanted to put the slider on all pages all you have to do is add the following.
elseif ( is_404() ) { echo '<div id="home-featured"><div class="wrap">'; genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); echo '</div></div>'; } elseif ( is_post_type_archive( 'portfolio' ) || is_singular( 'portfolio') ) { echo '<div id="home-featured"><div class="wrap">'; genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); echo '</div></div>'; } elseif ( is_singular( 'page' ) ) { echo '<div id="home-featured"><div class="wrap">'; genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); echo '</div></div>'; } elseif ( is_author() || is_category() || is_date() || is_search() || is_singular() || is_tag() ) { echo '<div id="home-featured"><div class="wrap">'; genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); echo '</div></div>'; }
Hope you find this useful.
pglessMemberHi braddalton,
Copied the code into functions.php as instructed. What code should use to view the slider on pages?
pglessMemberHi braddalton,
Thanks for your comments.
First thing i did was to comment out the section you said in home.php. Great no posts information displayed but the problem is It leaves negative white space:
/* add_action( 'genesis_loop', 'minimum_grid_loop_helper' ); function minimum_grid_loop_helper() { if ( function_exists( 'genesis_grid_loop' ) ) { genesis_grid_loop( array( 'features' => 0, 'feature_image_size' => 'featured', 'feature_image_class' => 'post-image', 'feature_content_limit' => 0, 'grid_image_size' => 0, 'grid_image_class' => 'alignnone', 'grid_content_limit' => 250, 'more' => __( '[Read more]', 'minimum' ), ) ); } else { genesis_standard_loop(); } } */ genesis();
<p>Looking in the CSS file, the following is missing:</p>
<pre class="brush: css; title: ; notranslate" title="">
.home .sidebar {
display: none;
}<p>Closest I can find is:</p>
<pre class="brush: css; title: ; notranslate" title="">
.home .minimum #inner {
display: none
}<p>And the button:</p>
<pre class="brush: css; title: ; notranslate" title="">
.home .page-title-button {
display: none;
}<p>What do you reckon?</p>
-
AuthorPosts