Forum Replies Created
-
AuthorPosts
-
Eli OverbeyMember
I am a little late to this, but I am adding a plugin for ratings and reviews on post types.
I am using the WP-PostRatings Plugin (works great for my needs) - http://wordpress.org/plugins/wp-postratings/installation/
But my question is, what is the best way to implement this into Genesis? I don't want to duplicate the existing schema.As of right now, I have:
//* Add a comment rating add_action( 'genesis_after_comments', 'sp_comment_policy' ); function sp_comment_policy() { if(function_exists('the_ratings')) { the_ratings(); } }
The function the plugin tells you to add is:
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
but it does not copy and paste with Genesis. As you can see above, I modified the 'sp_comment_policy' function, and the output works, but I want to do it correctly.Thoughts?
Eli OverbeyMemberThanks Ted! Grabbed the photo online to use a filler so I could get the dimensions (1800px by 700px). In fact, I think I pulled the dimensions off your site. And now, I've changed it 🙂
Eli OverbeyMemberThanks for the help mintegrate!
I've made it thus far:
Removed:
//* 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() ) );
Registered:
genesis_register_sidebar( array( 'id' => 'home-slider', 'name' => __( 'Home Slider', 'minimum' ), 'description' => __( 'This is the home slider', 'minimum' ), ) );
And added to front_page.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( array( 'post', 'page' ) ) && has_post_thumbnail() ){ echo '<div id="featured-image">'; echo get_the_post_thumbnail($thumbnail->ID, 'header'); echo '</div>'; } }
It worked! Only problem: It is outputting after the header (which is below the site tagline on minimum pro). I know I am calling for it "after_genesis_header" but still outputs after tagline.
Thoughts? I can't give a URL because it's localhost, but I have a picture:
As you can see, I have the space for the slider, just can't get it dropped in.
-
AuthorPosts