Viewing 3 replies - 1 through 3 (of 3 total)
  • You could try that in your child theme.

    Basic steps would be:

    – remove lines 38-40 from content-single:

    <footer class="entry-footer">
      <?php gazette_entry_footer(); ?>
    </footer><!-- .entry-footer -->

    – move the function into sidebar.php under line 17 (just after the secondary div opens) in a new div, something like:

    <div class="entry-info">
      <?php gazette_entry_footer(); ?>
     </div>

    You’ll need to add corresponding styles in your child’s stylesheet, but this should point you in the right direction.

    Thread Starter Argumentum

    (@argumentum0)

    Hi, Kathryn.

    Thanks for your answer.

    I did try moving the <?php gazette_entry_footer(); ?> to different sections of the templates, but that didn’t work because of this:

    With the other viewports, the entry-footer would appear on its original place, below the author-info box and above the related posts.

    I should be more specific. “Other viewports”, in this case, would be the viewports with less than 960px of width. With 960px or more, the sidebar actually becomes a sidebar — it goes to the right side of the screen. With less than 960px, the sidebar stays down the page, below the related posts and collapsed (the user needs to touch the sidebar-toggle to view the sidebar).

    That means moving the entry footer to the sidebar would put it below the related posts in mobile viewports. It also would hide it due to the collapsed sidebar. That doesn’t happen with the author info box, which stays visible above the related posts, right below the post content, even in mobile.

    I wanted the entry footer to have the same behaviour of the author box info, but changing templates files wasn’t working. It was killing me.

    In the end, it was all about JavaScript. The file single.js has this:

    function authorInfo() {
    	var authorInfo = $( '.author-info' );
    	if ( authorInfo.length ) {
    		if ( $( window ).width() > 959 ) {
    			authorInfo.prependTo( '.widget-area' );
    		} else {
    			authorInfo.insertAfter( '.entry-content' );
    		}
    	}
    }
    
    $( window ).load( authorInfo ).resize( debounce( authorInfo, 500 ) );

    I created and enqueued a new JS file to do the same with the entry footer. Apparently it’s been working well. I’ll mark this as resolved, but feel free to make any comments. If you want to see it working, here’s one example: http://goo.gl/ACCwff

    Thanks again. You’ve been doing a great job around here.

    With the other viewports, the entry-footer would appear on its original place, below the author-info box and above the related posts.

    Ah, I missed that!

    Glad you found a solution, and thanks for sharing it in case it helps others!

    Thanks again. You’ve been doing a great job around here.

    Aw, thanks. I enjoy helping folks and that’s nice of you to notice!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Moving the entry footer’ is closed to new replies.