Community Forums › Forums › Archived Forums › Design Tips and Tricks › Move Featured Image
Tagged: agency pro
- This topic has 11 replies, 2 voices, and was last updated 11 years, 10 months ago by
macrunner.
-
AuthorPosts
-
December 20, 2013 at 1:22 am #80410
macrunner
ParticipantHi,
I am using the theme Agency Pro, I would like to move Title post and date time, author etc..., below picture.
so as to obtain Featured Image (or any images ) above.Screenshot (Photoshop)
Original: http://i.imgur.com/YBNXFgO.jpg
Edit: http://i.imgur.com/ECPtW3w.jpg
What files should I change?
I hope for some help, I really appreciate thanks 🙂
December 20, 2013 at 1:36 am #80412Brad Dalton
ParticipantDecember 20, 2013 at 2:33 am #80419macrunner
ParticipantHi, I was working on the local server, but I've uploaded a new installation on the remote server.
this is the link: http://egotheme.itThank you very much
December 20, 2013 at 3:17 am #80420Brad Dalton
ParticipantOn archives or single posts?
What code did you use to add it?
Try the third code snippet on this page http://wpsites.net/web-design/add-remove-image-above-post-title/
December 20, 2013 at 3:26 am #80421macrunner
ParticipantBoth, archive and single posts.
I tried to follow this tutorial (yours): http://wpsites.net/web-design/display-featured-image-before-or-after-entry-title-on-single-posts-pages/
but it works partially.
The site currently no modification or addition code, installed WordPress + Genesis + Agency Pro active theme.
December 20, 2013 at 3:37 am #80422macrunner
ParticipantI tried to use this code that thou hast reported: http://wpsites.net/web-design/add-remove-image-above-post-title/
but does not work well, the images are duplicated: http://egotheme.it
This is the code that I used:
functions.phpadd_action( 'genesis_entry_header', 'wpsites_before_post_image', 5 ); function wpsites_before_post_image() { if ( is_page() ) return; if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) { printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); } }style.css
.post-photo { margin-bottom: 35px; display: block; margin: 0 auto 2.4rem; }December 20, 2013 at 4:15 am #80431Brad Dalton
ParticipantYou'll also need to remove the image after the title
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
You can also control featured images in your Genesis > Theme Settings > Content Archives.
December 20, 2013 at 4:28 am #80434macrunner
ParticipantHi Brad,
Okay, now it works fine!Thank you very much 🙂
December 20, 2013 at 4:28 am #80435Brad Dalton
ParticipantOr you could also use something like this:
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); add_action( 'genesis_entry_header', 'genesis_do_post_image', 5 );
December 20, 2013 at 4:42 am #80439macrunner
ParticipantIs much better, because it Featured Image only appears in the preview, awesome 🙂
Thank you again 🙂December 27, 2013 at 10:24 am #81407macrunner
ParticipantHi,
is also possible for a Video (embed or link) ?
Thanks!December 27, 2013 at 1:27 pm #81438macrunner
ParticipantI apologize, I opened a new thread: http://www.studiopress.community/topic/move-video-in-agency-pro/
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.