• Hi Robin,

    Thanks for the awesome plugin.

    Just wondering if it’s possible to include post meta (Date, Author) over the full width image, along with the Post Title.

    Many thanks,

    Matt.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    It is possible, yes. There are action hooks both before and after the banner image title. I wrote a tutorial about how I’ve used the one before to add a widget to the banner area.

    I can tell you generally how the process will work, but some elbow grease would still be required if you start from this example because the Genesis author shortcode does not work outside of the post loop, and the banner is outside of the loop. Here’s a starting example with the author bit included, although it doesn’t work (based on the standard snippet):

    add_action( 'display_featured_image_genesis_after_title', 'prefix_add_entry_meta_banner' );
    /**
     * Add entry meta after the image banner title.
     */
    function prefix_add_entry_meta_banner() {
    	echo '<div class="entry-meta">';
    	echo do_shortcode( '[post_date] by [post_author_posts_link] [post_comments] [post_edit]' );
    	echo '</div>';
    }
    

    You would also need to remove the default entry meta. Hope this helps you get started.

    Thread Starter Matterialise

    (@matterialise)

    Thanks so much for your reply Robin.

    I’ve just output the date for now.

    https://gentrify-2.sitebyma.net/geelong-west-structural-renovation/

    I’m just wondering if you could point me in the right direction to align the date horizontally under the title… it currently sits to the right.

    I assume this relates to the flexbox css but after some investigation can’t quite get there. I guess it’s a small update to CSS required.

    Many thanks in advance,

    Matt.

    Plugin Author Robin Cornett

    (@littlerchicken)

    If you need to use flexbox on the .big-leader .wrap element, you will need to add flex-wrap: wrap; to the rules for that. You also have a max-width set on the title and entry meta; I would try removing the max-width from .big-leader .entry-meta and add flex-basis: 100%; to that as a starting point.

    Thread Starter Matterialise

    (@matterialise)

    Thanks so much Robin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add Post Meta under Post Title’ is closed to new replies.