Thumbnail of the latest posts page
Ok, here is how the thumbnail url should be called: <header <?php if ( has_post_thumbnail($currentpageid) ) { ?> style=”background-image: url(<?php echo $page_thumb[‘0’];?>)”<?php }?>></header>
Ok, here is how the thumbnail url should be called: <header <?php if ( has_post_thumbnail($currentpageid) ) { ?> style=”background-image: url(<?php echo $page_thumb[‘0’];?>)”<?php }?>></header>
There are some flaws in the architecture as you’ve described it, but it may well be too far along for you to change that. If it’s not, it would make more sense to extend the built-in user feature and just add the additional fields you need for that user. If it’s too far along for … Read more
You can try rebuilding an array of the two queries or splice the fixed_posts into the essays array. Maybe something like below. $essay = get_posts(); $fixed_posts = get_posts(); $post_positions = array(2,5,10); $x = 0; foreach ($essays as $i => $essay) { if ($post_positions[$x] == $i) { $top_posts[] = $fixed_posts[$x]; $x++; } $top_posts[] = $essay; } … Read more
How to exclude posts ordered by comment_count from subsequent wordpress loops using WP_Query?
From next_posts_link: Add the $max_pages parameter to the next_posts_link() function when querying the loop with WP_Query. To get the total amount of pages you can use the ‘max_num_pages’ property of the custom WP_Query object. next_posts_link( ‘Next →’, $connected->max_num_pages );
Secondary loop cuts off at 10 posts?
After rewriting post type’s URL, the number of queries has increased dramatically
The literal implementation would be to: Create array variable While looping add to it ID of each post, using term name as key (so you have array of arrays) After main loop check the array and query additional posts if needed, using stored IDs for post__not_in so there are no duplicates Syntax will be something … Read more
Give something like this a whirl: <?php // Get header get_header(); ?> <?php // Begin loop $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args = array ( ‘posts_per_page’ => 1, ‘paged’ => $paged ); query_posts($args); if (have_posts()) : while (have_posts()) : the_post(); ?> <article> <h1><?php the_title(); ?></h1> <p class=”time”><?php the_time(‘l, F jS, Y’); ?></p> <?php … Read more
One page loop issue with posts