Forum Replies Created
-
AuthorPosts
-
September 30, 2020 at 3:49 pm in reply to: Wellness Pro – Display Featured Image Caption in Posts #501269abails06Participant
Thanks for the response. I should have been more clear in my question. Is there additional php I can add to this code in functions.php to get it to automatically display the caption associated with the image when I imported it. If I can also assign it the alt tag associated with the uploaded image and not the post title, that would also be helpful, but more of a minor issue.
add_action( 'genesis_entry_content', 'wellness_featured_image', 1 ); function wellness_featured_image() { $add_single_image = get_theme_mod( 'wellness_single_image_setting', true ); $image = genesis_get_image( array( 'format' => 'html', 'size' => 'featured-image-large', 'context' => '', 'attr' => array ( 'alt' => the_title_attribute( 'echo=0' ), 'class' => 'aligncenter' ), ) ); if ( is_singular() && ( true === $add_single_image ) ) { if ( $image ) { printf( '<div class="featured-image">%s</div>', $image ); } } }
abails06ParticipantI found the answer here:
How to use an inline logo instead of a background image in Genesis
And kept the background image.
abails06ParticipantHey Christoph,
Thanks for the suggestion. I have a background that repeats across the site, and I want the logo image to overlay on top of that. I also want to be able to modify the site and leave the logo in place if I change the background and not have to create a new image each time. Everything I've read has the logo set as the background, and I want to place the logo over the background.
Thoughts?
Thanks!
-
AuthorPosts