• Resolved Halil ESEN

    (@halilesen)


    Hi Ben,
    I made an author page myself like this:

    <?php get_header(); ?>
    
    <div class="post-author" style="border: none; padding: 13px;">
    	<?php if ( get_theme_mod( 'author_avatar_posts' ) != 'yes' ) : ?>
    	<div class="avatar-container">
    		<?php echo get_avatar( get_the_author_meta( 'ID' ), 80, '', get_the_author() ); ?>
    	</div>
    	<?php endif; ?>
    	<div>
    		<div class="author"><?php the_author(); ?></div>
    		<?php the_author_meta('description'); ?>
    
          <div class="yazarbaglantilari">
    <?php
    if ( get_the_author_meta('instagram', $theID)) {
    $output .= '<a href="https://www.instagram.com/' . get_the_author_meta('instagram', $theID) . '/" target="_blank"><i class="fab fa-instagram"></i></a>';
    }
    if ( get_the_author_meta('twitter', $theID)) {
    $output .= '<a href="https://twitter.com/' . get_the_author_meta('twitter', $theID) . '" target="_blank"><i class="fab fa-twitter"></i></a>';
    }
    if ( get_the_author_meta('facebook', $theID)) {
    $output .= '<a href="' . get_the_author_meta('facebook', $theID) . '" target="_blank"><i class="fab fa-facebook"></i></a>';
    }
    if ( get_the_author_meta('linkedin', $theID)) {
    $output .= '<a href="' . get_the_author_meta('linkedin', $theID) . '" title="" target="_blank"><i class="fab fa-linkedin"></i></a>';
    }
    if ( get_the_author_meta('youtube', $theID)) {
    $output .= '<a href="' . get_the_author_meta('youtube', $theID) . '" title="" target="_blank"><i class="fab fa-youtube"></i></a>';
    }
    if ( get_the_author_meta('forum', $theID)) {
    $output .= '<a href="' . get_the_author_meta('forum', $theID) . '" title="" target="_blank"><i class="fas fa-comments"></i></a>';
    }
    if ( get_the_author_meta('url', $theID)) {
    $output .= '<a href="' . get_the_author_meta('url', $theID) . '" title="" target="_blank"><i class="fas fa-globe"></i></a>';
    }
    echo $output;
    ?>
    		</div>
    	</div>
    </div>
    
    <?php do_action( 'ct_mission_news_archive_post_before' ); ?>
    <div id="loop-container" class="loop-container">
        <?php
        if ( have_posts() ) :
            while ( have_posts() ) :
                the_post();
                ct_mission_news_get_content_template();
            endwhile;
        endif;
        ?>
    </div>
    <?php do_action( 'ct_mission_news_archive_post_after' ); ?>
    
    <?php get_footer(); ?>

    But pagination is not working. Only the first page is shown. I couldn’t find what code to do this with or what I found didn’t work. What do you recommend?

    Thanks.

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

    (@bensibley)

    Hi Halil,

    The pagination has its own function that needs to be included in your template. You can add this below the “loop” to show pagination:

    the_posts_pagination()

    Thread Starter Halil ESEN

    (@halilesen)

    thank you. It’s working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pagination in Custom Author Page’ is closed to new replies.