Forum Replies Created
-
AuthorPosts
-
April 7, 2016 at 9:10 am in reply to: Get URL of the post image to use it as a background-image #183115shotgunshellMember
You're welcome!
April 6, 2016 at 9:12 am in reply to: Get URL of the post image to use it as a background-image #183057shotgunshellMemberThis is the full function which worked for me in testing, so try replacing what you have with it:
add_action( 'genesis_after_header', 'parallax_image' ); function parallax_image() { global $post; if ( has_post_thumbnail() ) { $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID, 'full') ); } else { $url = 'http://www.abc.de'; } ?> <div class="parallax-section hero-parallax"> <div class="parallax-content wrap"></div> <div class="parallax-background" style="background-image: url('<?php echo $url ?>');"></div> </div> <?php }
April 5, 2016 at 9:24 am in reply to: Get URL of the post image to use it as a background-image #182997shotgunshellMember@mocca, try inserting a global $post;, like so:
function parallax_image() { global $post; if ( has_post_thumbnail() ) {
shotgunshellMemberThere are two things which need correcting inside the "More About Our Services" text widget:
First, the <div class="align left"> should be <div class="alignleft"> (i.e., remove the space in the class name).
Second, the a href tag shown below has a double quote mark in the wrong place (it should be just after href= not just before landing):
<div class="alignright"><a class="button" href=http://glamarazzibrides.com/makeup-and-hair-services/"landing/">Learn More</a></div>
shotgunshellMemberThis message typically means that your code is missing a closing brace (i.e., there's an opening brace which is missing its closing partner).
shotgunshellMemberI don't know if this is considered to be the "proper" solution, but commenting out line 98 in the front-page.php file is what works for me:
// 'grid_content_limit' => 250,
shotgunshellMemberI think it would be easier to just create a new widget area for your home page, and then add the Genesis Featured Posts widget to it.
shotgunshellMemberYou need to activate the "Extra Sidebar Widgets" module.
-
AuthorPosts