Custom loop in addition to default on archive page

I’m with s_ha_dum that this isn’t very clear on what’s happening, but have you tried wp_reset_postdata()? I believe you would put it before the last while loop in your example above. Here’s an article on other methods of resetting the query if that’s not working: http://digwp.com/2011/09/3-ways-to-reset-the-wordpress-loop/

Create a custom URL for blog archive

When you set up a static page as home page, you can set up also a page for the blog archive. If you do that, you don’t need to alter the WP_Query in the blog page template, you only need to work with The loop like in a archive template file. When the page for … Read more

pre_get_posts conflict with archive posts

As your pre_get_posts function stands, you’ll have that conflict as you are using pre_get_posts very carelessly. pre_get_posts modifies the query variable object before the main query AND WP_Query is executed. So any changes in your function will influence both the main query and any custom query that uses WP_Query. That is why everything is haywire … Read more

Blog pages show at most unrecognized by code

You must set your post counter outside your loop first before it will work. If you turn debugging on, you will get an undefined variable notice. You can do something like this just outside your loop before the loop starts $postvariable = 1; Alternatively you can make use of the build-in post counter, $wp_query->current_post. It … Read more

WordPress archives in header -necessary?

See this WordPress support page for an explanation of what the first line does. The second line you can remove and it will get rid of those archive entries from the header output HTML. For the SEO impact, search engines should be just fine as long as you have a site map for your posts.

Add hour to archive link?

Permalinks or the pretty url of your posts be set under permalink in settings. there you can use %hour% or many other available tags in your url

Is there a way to multiply archive loop results sequentially?

<?php $counter = 1; if(have_posts()) : while(have_posts()) : the_post(); ?> <?php if($counter == 1) : ?> <div class=”row clear” style=”margin-bottom:0px;”> <div class=”col-md-12 border-12″> <a class=”thumb” href=”https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”><?php the_post_thumbnail(‘category-thumbnail’); ?></a> <div class=”blog-details-wrapper clear”> <h2 class=”title”> <a href=”https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a> </h2> <span class=”date”><?php the_time(‘F j, Y’); ?> <?php … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)