Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Whenever items on the page need to be rearranged, you can do this by reordering them in a template file with a child theme.

    In this case, you’ll want to copy the content.php file from Tracks into your child theme. Then, in the content.php file in your child theme, locate lines 22-38. This contains the author-meta element.

    Add a space after line 15 (a closing div tag), and cut and paste the author info there. Here’s how the file should look after the edit:

    <div <?php post_class(); ?>>
        <?php ct_tracks_featured_image(); ?>
        <div class="entry-meta">
            <?php get_template_part('content/post-meta'); ?>
        </div>
        <div class='entry-header'>
            <h1 class='entry-title'><?php the_title(); ?></h1>
        </div>
        <div class="entry-container">
            <div class="entry-content">
                <article>
                    <?php the_content(); ?>
                    <?php wp_link_pages(array('before' => '<p class="singular-pagination">' . __('Pages:','tracks'), 'after' => '</p>', ) ); ?>
                </article>
            </div>
    <?php
            if(get_theme_mod('additional_options_author_meta_settings') != 'hide'){ ?>
                <div class="author-meta">
                    <div class="author">
                        <?php echo get_avatar( get_the_author_meta( 'ID' ), 72, '', get_the_author() ); ?>
                        <span><?php
                                _e( 'Written by:', 'tracks');
                                the_author_posts_link();
                              ?>
                        </span>
                    </div>
                    <div class="bio">
                        <p><?php the_author_meta( 'description' ); ?></p>
                        <?php get_template_part('content/author-social-icons'); ?>
                    </div>
                </div>
            <?php } ?>
            <?php get_template_part('sidebar','after-post-content'); ?>
            <div class='entry-meta-bottom'>
                <?php get_template_part('content/further-reading'); ?>
                <?php get_template_part('content/category-links'); ?>
                <?php get_template_part('content/tag-links'); ?>
            </div>
        </div>
    </div>
    Thread Starter VDPloeg

    (@vdploeg)

    Thank you. The author bio is now above the other theme items but still below the Jetpack insertions (related, sharing). Any ideas how to move those down? I understand they’re not part of your theme and am grateful for your assistance.

    Thread Starter VDPloeg

    (@vdploeg)

    Also, any idea why the author’s name splits up? In Chrome it appears on two lines, the last name below the photo. In IE11 it appears on one line, and in Edge it cuts my last name in half and puts it on another line.

    Theme Author Ben Sibley

    (@bensibley)

    Hmm I don’t think the jetpack icons can be moved lower. They probably hook into the_content which means the bio needs to appear after. The only way would be to add a function for the author bio that also hooks into the_content, but does so after the jetpack icons function does.

    I see what you mean about the author name. Try adding the following CSS:

    .author-meta .author span {
      white-space: nowrap;
    }
    Thread Starter VDPloeg

    (@vdploeg)

    That worked for the author name. Thanks again for your speedy assistance.

    Theme Author Ben Sibley

    (@bensibley)

    Sure thing ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Author Bio right under post’ is closed to new replies.