Metro Pro – move featured images below post titles

Community Forums Forums General Discussion Metro Pro – move featured images below post titles

This topic is: not resolved

This topic contains 7 replies, has 6 voices, and was last updated by  exelexys 8 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #61251

    ameeker
    Participant
    Post count: 29

    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?

    #61259

    Robin
    Participant
    Post count: 323

    My 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)

    #61267

    ameeker
    Participant
    Post count: 29

    Sounds good to me.

    #61275

    ameeker
    Participant
    Post count: 29

    So 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?

    #61377

    David Chu
    Participant
    Post count: 1374

    Hi,
    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:

    [php]
    require_once( GENESIS_WIDGETS_DIR . ‘/featured-post-widget.php’ );
    [/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

    #61391

    Tom
    Participant
    Post count: 968

    I 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.
    Updates via GenesisThemes.ca | Twitter | Google+ | Tumblr

    #61414

    nunotmp
    Participant
    Post count: 164

    If 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 like add_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
    }

    • This reply was modified 1 year, 1 month ago by  nunotmp.
    • This reply was modified 1 year, 1 month ago by  nunotmp.
    #92599

    exelexys
    Member
    Post count: 51

    Probably 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/

    • This reply was modified 8 months ago by  exelexys.
    • This reply was modified 8 months ago by  exelexys.
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.