A little help with a page template
-
Hi!
Just created an authors list page template following some web tutorial and mixing it with the style of my theme, but i’m not reaching one thing, and i’m sure it is really easy.
Here is the code:
<?php /* Template Name: Autores */ // Get all users order by amount of posts $allUsers = get_users('orderby=post_count&order=DESC'); $users = array( ) ; // Remove subscribers from the list as they won't write any articles foreach($allUsers as $currentUser) { if(!in_array( 'subscriber', $currentUser->roles )) { $users[] = $currentUser; } } ?> <?php get_header(); ?> <div class="vw-page-wrapper clearfix <?php vw_the_sidebar_position_class(); ?>"> <div class="container"> <div class="row"> <div class="pagina-autores"> <?php foreach($users as $user) { ?> <div class="pagina-autores-info" <?php vw_itemprop('author'); vw_itemtype('Person'); ?>> <?php if ( ! empty( $instance['title'] ) ) : ?> <h3 class="vw-widget-author-title"> <span><?php echo $instance['title']; ?></span> </h3> <?php endif; ?> <?php echo vw_the_author_avatar( $user, VW_CONST_AVATAR_SIZE_LARGE ); ?> <h4 class="vw-widget-author-name" <?php vw_itemprop('name'); ?>> <?php echo nl2br( $user->display_name ); ?> </h4> <div class="vw-widget-author-bio" <?php vw_itemprop('description'); ?>> <?php echo nl2br( $user->user_description ); ?> </div> <div class="vw-author-socials"> <?php vw_the_user_social_links( $user ); ?> </div> </div> <?php } ?> </div> <?php get_sidebar(); ?> </div> </div> </div> <?php get_footer(); ?>
I want 2 things that i’m not being able to reach:
– Exclude the main user from this list
– Put the sidebar in its place. Now it is showing below the content, i’ve tried to chage the get_sidebar a lot of places, but i can’t make it appear on its placeAnyone have a clue? I’m not a code writer, just a copy / paste one, so any step by step explanation will be really apreciated!
Thanks a lot
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘A little help with a page template’ is closed to new replies.