Combining Date, Post Title, and comments link into one line

Community Forums Forums Design Tips and Tricks Combining Date, Post Title, and comments link into one line

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  matt@mattdotcom.com 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #87352

    matt@mattdotcom.com
    Participant
    Post count: 10

    Hi folks,

    In the BEAUTIFUL child theme, I’m struggling with combining the .entry-time .entry-title and .entry-comment-link divs all onto one line, similar to this site (but with comment link floating right). Any help? The “genesis_before_post_title” hook seems like it would work perfectly, but there doesn’t seem to be an HTML5 equivalent?

    thank you!

    Matt

    #87357

    MarketLeaner
    Participant
    Post count: 27

    “genesis_entry_header” replaced “genesis_before_post_title”

    since it also replaced other things, if you have trouble putting it where you need, use priority numbers ie.

    function ( hook location, name of function, 5)

    http://my.studiopress.com/docs/genesis-loop-hooks-comparison/

    #87360

    matt@mattdotcom.com
    Participant
    Post count: 10

    Ah, OK I’ve never messed with priority numbers before. How do I tell it to do [post-date] first, then the post title, then the [post_comments]?

    Something like this? Or am I making it way too complicated?

    
    remove_action('genesis_entry_header', 'genesis_do_post_title');
    add_action( 'genesis_entry_header', 'custom_entry_header' );
    function custom_entry_header() {
     
    	if ( ! is_page() ) {
    		echo '<div class="entry-time">';
    		echo do_shortcode( '[post_date' );
    		echo '</div><!-- end .entry-time -->';
                    add_action( 'genesis_entry_header', 'do_genesis_post_title' );
                    echo '<div class="entry-comments-link">';
    		echo do_shortcode( '[post_comments' );
    		echo '</div><!-- end .entry-comments-link -->';
    	}
     
    }
    
    #87716

    matt@mattdotcom.com
    Participant
    Post count: 10

    OK got this figured out! here’s what I did:

    in Functons.php:

    add_action( 'genesis_entry_header', 'custom_entry_header', 5);
    function custom_entry_header() {
     
    	if ( ! is_page() ) {
    		echo '<div class="entry-time">';
    		echo do_shortcode( '[post_date]' );
    		echo '</div><!-- end .entry-time -->';
                 
    	}
     
    }

    then just messing with FLOAT in the stylesheet for .entry-time .entry-comments-link

    thanks for your help MarketLearner!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.