display posts from members page
-
Here’s a link to the site: https://seattleseonetwork.org/about-us
So what I need to do is to display the member’s posts when you click on their image. Keep in mind I already have an author’s page and the member’s page by default would be single-seo_member.php page.I’ve found a way to link that to the author’s page, but now some of the member’s have a 404 error or it defaults to Carl or Alex’s Author Page.
Here’s the code:
<?php //RETRIEVE MEMBERS FROM DATABASE query_posts( array( 'post_type' => 'seo_member', 'orderby' => 'rand' )); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <article class="member clearfix"> <div class="col-2 alignleft"> <h3><a href="<?php /*the_permalink();*/ echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_title(); ?> - <?php the_field('ssn-title') ?></a></h3> <p class="caption"><a href="<?php the_field('member-company-link') ?>"><?php the_field('member-company') ?></a> - <?php the_field('working-title') ?></p> <?php the_field('member-bio') ?> <?php if(get_field('member-available-for-speaking') == true): ?> <br /> <p><?php the_title(); ?> is available for <a href="<?php bloginfo('url') ?>/speakers">Speaking Events</a></p> <?php endif; ?> </div> <div class="col-1 alignright"> <div class="member-thumb-container"><a href="<?php /*the_permalink();*/ echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><img src="<?php the_field('member-photo') ?>" alt="photo of SSN member" /></a></div> </div> </article><!-- END .MEMBER --> <?php endwhile; else: ?> <p><?php _e('No Speakers Listed'); ?></p> <?php endif; ?>
Please Help I’ve been wrestling with this for days!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘display posts from members page’ is closed to new replies.