The Loop, Front page, Pages and excerpts
-
Hi,
I’ve got a child theme in which I want to have three specific and static pages (or at least their excerpts and featured images) as part of the front page.
I have a frontpage.php, and it’s set as the static front page in the site’s settings. All good so far.
The problem comes when I switch permalink structures and/or when I switch from dev on localhost (Ubuntu 12.04.1) to dev on hosted solution (no idea what it’s running, but mostly via cPanel/ftp)
<?php $args=array('order' =>'asc','post_type' =>'page','post__in' => array(6,8,10), ); $page_query = new WP_Query($args); ?> <?php while ($page_query->have_posts()) : $page_query->the_post(); ?> <div class="section"> <?php if ($page_id==6) { ?> <div id="front-box-left"> <?php } elseif ($page_id==8) { ?> <div id="front-box-center"> <?php } else { ?> <div id="front-box-right"> <?php } ?> <?php the_post_thumbnail() ?> <h2><a href="<?php the_permalink();?>" id="front-box-header"><?php the_title();?></a></h2> <span id="front-box-text"><?php the_excerpt();?></span> </div> </div> <?php endwhile; ?>
But for some reason I’m not getting any css id love: all three page excerpts are coming up
<div id="front-box-right">
This is annoying. The are otherwise rendering correctly, but in the wrong order?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘The Loop, Front page, Pages and excerpts’ is closed to new replies.