Posts by VickiMcLeod

4 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
VickiMcLeod says

Thank you Kris, I´m doing something which I haven´t done before and it is making me nervous!

4 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
VickiMcLeod says

Hi Gareth

Sorry to bother you. I have copied the index.php but I don´t know where to put the copy. Could you let me know please where I should be copying it to?

Thank you


The only way to do it is to create a new template (copy the index.php and rename to something else.

Now in the page, add the following straight after the first <?php


/* Template Name: Summer Blog */

change the loop from:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

to:


<?php $the_query = new WP_Query( 'category_name=summer' );
while ( $the_query->have_posts() ) : ?>

Now go down the page and find the following:

<?php endwhile; endif; ?>

and change too:

<?php endwhile;
wp_reset_query();
wp_reset_postdata(); ?>

Now go to the page you created for the summer blog, and change the template to the Summer Blog option (right hand side of page).

Now all being good, it should now only display the content from a category called summer.
4 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
VickiMcLeod says

Thank you Gareth, I am going to have a go at that later today, I shall report back!

4 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
VickiMcLeod says
Hi there, we are only really using your blog design in a simplified way. See here: http://finest-holidays.com/blogs/ but I want to have two separate pages : one for Winter News and one for SUmmer News. However when i ask Summer News to be a blog template it copies what is already on the Winter News page…. Is there a way to have a fresh blog on this second page rather than a duplicate? Sorry to bother you, hope you can help me!
by
by
by
by
by
by