Least Number of Loops to Create Custom Homepage?

You can achieve this by checking where you are in the loop and outputting markup at the appropriate time. Within the object that holds the query results is a counter that keeps track of the current post, $wp_query->current_post. Note that it is zero-indexed, so first is 0, 2nd is 1, etc.. <?php while( have_posts() ): … Read more

Paged homepage – requirements?

If you put the following after the while loop, does it link to anything? <?php next_posts_link(‘&laquo; previous posts’); if (get_next_posts_link() && get_previous_posts_link()) echo ‘ | ‘; previous_posts_link(‘next posts &raquo;’); ?>

Display by tag from different post types

may i suggest you use instead get_posts()? example $args_t10 = array( ‘tag_id’ => 10, ); $postslist_t10 = get_posts( $args_t10 ); ?> $args_t10_v = array( ‘tag_id’ => 10, ‘post_type’ => ‘videos’ ); $postslist_t10_v = get_posts( $args_t10_v ); you then can merge and filter the duplicates $postmixed = array_merge($postslist_t10, $postslist_t10_v); $uniqueposts = array_unique(postmixed); reference wp: get_posts() and … Read more

How to call the_author_meta and make it work?

Add your author meta information after if ( have_posts() ) : <?php if ( have_posts() ) : the_post(); ?> About <?php the_author(); ?>, the author of this blog <?php userphoto_the_author_thumbnail() ?> <?php echo get_the_author_meta( ‘description’ ); ?> <?php rewind_posts(); while ( have_posts() ) : the_post(); ?> <?php //loop stuff ?> <?php endwhile; else: ?> <p><?php … Read more