Community Forums › Forums › Archived Forums › General Discussion › Metro Pro – move featured images below post titles
Tagged: featured images, Metro Pro
- This topic has 7 replies, 6 voices, and was last updated 10 years, 11 months ago by exelexys.
-
AuthorPosts
-
September 7, 2013 at 2:03 pm #61251ameekerMember
I can't figure out how to remove the action that's putting the featured images above the post titles on the home page. I tried,
remove_action( 'genesis_before_post_content', 'generate_post_image', 5 ); add_action( 'genesis_post_content', 'genesis_do_post_image' );
but that didn't do anything.
Thoughts?
Looking for Genesis website design backed by strategy? http://www.angiemeekerdesigns.com
September 7, 2013 at 3:52 pm #61259RobinMemberMy recommendation would be to install the Genesis Featured Widget Amplified--it gives you more control over those widget areas, including the placement of the featured image relative to the title. HTH
I do the best I can with what I’ve got. (say hey on twitter)
September 7, 2013 at 4:04 pm #61267ameekerMemberSounds good to me.
Looking for Genesis website design backed by strategy? http://www.angiemeekerdesigns.com
September 7, 2013 at 4:24 pm #61275ameekerMemberSo I found where it is - it's in the featured-post-widget.php in the genesis lib includes. So I can change it there, but that's not the right way to do it... because then any upgrades to genesis would overwrite it. But I want to use the built in Featured Posts instead of the plugin you mentioned.
Hmmm... Can I just pull a copy of that file into my child theme?
Looking for Genesis website design backed by strategy? http://www.angiemeekerdesigns.com
September 8, 2013 at 12:39 pm #61377David ChuParticipantHi,
That's an interesting question, so I did a quick test. Just putting that file into the child theme didn't "activate" it. I looked further, and found the following line which activates the core file:require_once( GENESIS_WIDGETS_DIR . '/featured-post-widget.php' );
So I would say just do a similar include, but point it to the one in the child theme, BUT.... then you get an error because you're trying to "redeclare" the class! So this isn't as simple as it might be. One could maybe rename the class, possibly use a new widget, etc., but that's getting into pretty muddy water, and would take some research.
So if it were me, I'd probably just make myself a custom home loop to do that, or try another plugin. So not a conclusive answer, but I hope it helps a bit.
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
September 8, 2013 at 3:11 pm #61391TomParticipantI think you can achieve what you want with CSS. This worked for me from the Element Inspector in Chrome:
This removes top-placed featured images, leaves left aligned images:
.alignnone img, img.alignnone { display: none; }
This removes all featured images:
.featured-content img, .gallery img { display: none; }
On the right track?
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]September 8, 2013 at 5:23 pm #61414nunotmpMemberIf you are using html5 the hooks have changed. You will need to use
remove_action( 'genesis_entry_header' , 'genesis_do_post_image', 8 );
and then reapply with a lower lower/higher priority. Something likeadd_action( 'genesis_entry_header', 'genesis_do_post_image', 5 );
If you are using xhtml then you will need to do this.
remove_action( 'genesis_post_content', 'genesis_do_post_image' );
add_action( 'genesis_before_post_title', 'genesis_do_post_image' );
Now you can place this in your home.php file or adding a conditional statement in your functions.php file. like so
if ( is_home() ) { // add actions here }
February 26, 2014 at 10:59 pm #92599exelexysMemberProbably way too late to benefit the original poster, but perhaps someone else will find these instructions for modifying the featured posts widget (in isolation from genesis core) useful:
http://petercoughlin.com/tweaking-the-genesis-featured-posts-widget/ -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.