custom static front page with posts
-
Hi all I really need some help here. Can anybody direct me in the right direction?
I would be really grateful the problem I am having is the following;I have a static front page on which I would like to have one area where I just have two columns with specific posts which is working.For this to work I have made a template with the code but the problem is that it will not post on the page but just below with other posts which are normally visible on the front page. How can this be avoided? I have been offered the solution to delete the code in page.php but then I lose the posts which normally would be filling the page so that is not really an option.
So to be clear I would like to have the following set up for my page:
Header – slider – custom posts – posts .
Many thanks in advance
<? /* Template Name: news */ ?> <?php /** * Template for news on the front page */ get_header(); ?> <?php /* Run the loop to output the pages. * If you want to overload this in a child theme then include a file * called loop-page.php and that will be used instead. */ the_post(); get_template_part( 'loop', 'page' ); ?> <div style="float:left;width:50%;"> <div style="padding-right:5px;"> LEFT CONTENT HERE <?php global $more; $more = 0; query_posts('cat=58&posts_per_page=1'); if(have_posts()) : while(have_posts()) :the_post(); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2> <div><?php the_excerpt(); ?></div> <?php endwhile; endif; wp_reset_query();?> </div></div> <div style="float:right;width:50%;"> <div style="padding-left:5px;"> LEFT CONTENT HERE
- The topic ‘custom static front page with posts’ is closed to new replies.