FGazerro
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Posts Losing FormattingHey,
Thanks for your help, that did the trick.
Frank
Forum: Themes and Templates
In reply to: Problem with posts_nav_link()Greenshady and Kalon,
I worked a bit with the code that Greenshady gave me and i added a bunch of posts to make sure there would be something to link to. I encountered two problems.
First, the nav links still aren’t there. Second, for some reason the footer and the sidebar appeared inside the posts area underneath them. To fix this I added a handful of </div>’s to the bottom of index.php. Any thoughts? I really appreciate the help.
-Frank
Here’s the code:<?php get_header(); ?>
<?php
$postCount = 0;
$page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
query_posts(‘paged=$page&showposts=10&post_per_page=-1&cat=’ . get_query_var(‘cat’));
?><?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div id=”content”>
<?php if($postcount == 0) : ?>
<div id=”latest” class=”entry”>
<div class=”clearfloat”>
<h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
<div class=”auth”> <?php the_author() ?> </div><div class=”calendar”>
<?php the_time(‘l, F j Y’);?>
</div><span class=”frontcat”><?php the_category(‘, ‘) ?> </span>
<?php the_content(); ?>
<div class=”commentcount”><p><?php comments_popup_link(‘0 Comments’, ‘1 Comment’, ‘% Comments’);?></p></div>
<script src=”http://feeds.feedburner.com/~s/FrankGBlog?i=<?php the_permalink() ?>” type=”text/javascript” charset=”utf-8″></script>
</div>
</div><?php elseif( $postcount > 0 && $postcount <= 3 ) : ?>
<div class=”excerpt”>
<h3>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h3>
<div class=”auth”> <?php the_author() ?> </div><div class=”calendar”>
<?php the_time(‘l, F j Y’);?>
</div><span class=”frontcat”><?php the_category(‘, ‘) ?> </span>
<?php the_content(); ?>
<div class=”commentcount”><p><?php comments_popup_link(‘0 Comments’, ‘1 Comment’, ‘% Comments’);?></p></div>
<script src=”http://feeds.feedburner.com/~s/FrankGBlog?i=<?php the_permalink() ?>” type=”text/javascript” charset=”utf-8″></script>
</div><?php else : ?>
-
<?php
- » ‘; the_title(); echo ‘
ob_start();
echo ‘‘;
$links[] = ob_get_contents();
ob_end_clean();
?><?php endif; ?>
<?php $postcount++; endwhile; ?>
<div class=”navigation-links”>
<?php posts_nav_link(”,'<span class=”previous”>« Previous Page</span>’,'<span class=”next”>Next Page »</span>’); ?>
</div>
</div><?php endif; ?>
</div>
</div>
</div>
</div>
</div><?php get_sidebar(); ?>
<?php get_footer(); ?>
Forum: Themes and Templates
In reply to: Problem with posts_nav_link()Hey there,
Thanks for your help with this. I replaced my code with yours. Unfortunately it still didn’t work. Any other thoughts?
I appreciate your help.
Frank
Forum: Themes and Templates
In reply to: Problem with posts_nav_link()Hey there,
Thanks for responding. My site is FrankGazerro.com. Its not done yet but its functional (for the most part). Below I’ll paste the index.php code. Thanks for your help.
here’s the code:
<?php if (have_posts()) { ?> <div id="content"> <?php $postCount = 0; $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts( 'paged=$page&showposts=10&post_per_page=-1&cat=' . get_query_var('cat') ); while (have_posts()) { the_post(); if( $postcount == 0 ) { //GETS LATEST POST ?> <div id="latest" class="entry"> <div class="clearfloat"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="calendar"> <?php the_time('l');?>, <?php the_time('F'); ?> <?php the_time('j'); ?> <?php the_time('Y'); ?></div> </div> <p class="frontcat"><?php the_category(', ') ?> </p> <?php the_content(); ?> <div class="commentcount"><p><?php comments_popup_link('0 Comments', '1 Comments', '% Comments');?></p></div> </div> <?php } elseif( $postcount > 0 && $postcount <= 3 ) { //GETS NEXT THREE EXCERPTS ?> <div class="excerpt"> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="calendar"> <?php the_time('l');?>, <?php the_time('F'); ?> <?php the_time('j'); ?> <?php the_time('Y'); ?> </div> <p class="frontcat"><?php the_category(', ') ?> </p> <?php the_content(); ?> <div class="commentcount"><p><?php comments_popup_link('0 Comments', '1 Comment', '% Comments');?></p></div> </div> <?php } else { ob_start(); echo '<li>» <a href="'; the_permalink(); echo '">'; the_title(); echo '</a></li>'; $links[] = ob_get_contents(); ob_end_clean(); } $postcount ++; } } ?> </div>