bryndog
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: show last few posts on home page, then paginate the rest?stvwlf – Just want to say rthatks for puttin’ time in on this for me,
I kind of understand what you explained in your post and I implemented it online and got a syntax error on the last line of the code.
I reckon I have either too many ends or not enough, and I’m just not bright enough on this subject to work it out.
This is the syntax error I get :Parse error: syntax error, unexpected $end in /ah…now/I’m/not_that/stupid/anymore/wp-content/themes/photest/index.php on line 63
Line 63 is the very last line calling for the footer.
…and here is the index page code changed to your suggestions as far as I can understand them.
<?php get_header(); ?> <?php $withcomments = 1 ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <!-- start content --> <div id="content"> <div class="post" id="post-<?php the_ID(); ?>"> <h1 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> <p class="meta"><small>Posted on <?php the_time('F jS, Y') ?> by by <?php the_author() ?> <?php edit_post_link('Edit', ' | ', ''); ?></small></p> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="tags"><?php the_tags('Tags: ', ', ', ' '); ?></p> <p class="links"> Posted in <?php the_category(', ') ?> • <?php edit_post_link('Edit', '', ' • '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> </p><br /> <div id="commentsbox"><?php comments_template(); ?><br /></div> <?php endwhile; ?> </div> </div> <!-- end content --> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> <?php $recent = new WP_Query("offset=10"); while($recent->have_posts()) : $recent->the_post();?> <ul> <li id="recent-posts"> <h2>Recent Posts</h2> <ul> <?php while (have_posts()) : the_post(); ?> <li> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <?php the_excerpt() ?> </li> <?php endwhile; ?> </ul> </li> </ul> <div id="sidebarnew"><?php include("sidebarnew.php"); ?></div> <?php get_footer(); ?>I know theres a problem somewhere I just don’t know where – any chance you could point it out for me. Thanks so much for helpin’ me out, you’ve been a star – B
Forum: Fixing WordPress
In reply to: Only 1 post showing on main pageOK so I did a little more searching.
The Ajax plugin does this, i installed it and it worked straight off.
Is there another way of doing it other than this?
The ajax seems cool, I was was just wondering.
Thanx anyway.
BForum: Fixing WordPress
In reply to: Only 1 post showing on main pageHi,
I’m havin’ exactly the same problem with my site.
I added in a the bit of code that shows he next x amount of excerpts myself, but I really want the index page to show the last 5 full posts.
Not to hijack this thread or anything but I imagine our problems are simlar, so here is my index page code with the excerpt code I added in commented out:<?php get_header(); ?> <?php $withcomments = 1 ?> <?php if (have_posts()) : the_post(); ?> <!-- start content --> <div id="content"> <div class="post" id="post-<?php the_ID(); ?>"> <h1 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> <p class="meta"><small>Posted on <?php the_time('F jS, Y') ?> by by <?php the_author() ?> <?php edit_post_link('Edit', ' | ', ''); ?></small></p> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="tags"><?php the_tags('Tags: ', ', ', ' '); ?></p> <p class="links"> Posted in <?php the_category(', ') ?> • <?php edit_post_link('Edit', '', ' • '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> </p><br /> <div id="commentsbox"><?php comments_template(); ?><br /></div> <!--<ul> <li id="recent-posts"> <h2>Recent Posts</h2> <ul> <?php while (have_posts()) : the_post(); ?> <li> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <?php the_excerpt() ?> </li> <?php endwhile; ?> </ul> </li> </ul> </li> --> </div> </div> <!-- end content --> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> <div id="sidebarnew"><?php include("sidebarnew.php"); ?></div> <?php get_footer(); ?>Thanks in advance for any help on this, weird little problem.
B