I just moved my business site to Wordpress - http://jhmattern.com I added a company blog. For the moment, I'm using Wordpress' options to point the homepage to my About page (will always point to some static page), and my blog is pointed to http://jhmattern.com/blog If you visit the blog, and look below the two posts there, you'll see that there is no option for viewing a page of previous posts. I've gone to the Wordpress support forum and made sure the code was added to the page template for the blog address, but still nothing shows. I really need some kind of navigation to let people view more posts without digging through categories. Does anyone know what I can do to get this working? Thanks! Jenn
Hi Jenn, Happy Holidays I have recently become a wordpress Junkie , striping it down and learning it from base up. Here is what you need In "single.php" and "index.php" Make sure you have the following code <div class="alignleft"><?php previous_post_link('« %link') ?></div> <div class="alignright"><?php next_post_link('%link »') ?></div> PHP: If you add that , it will give you the posts Nice part is that wordpress is VERY flexible Let me know if you need more help Maybe whoever coded this template for you forgot that. Also this is wordpress 2.3 right?
It was already in there. I'm not sure if the problem is with the theme (sonia) or with the fact that I'm using the Wordpress options to have a static page on the homepage with my blog on another page I'd chosen. Scratch that - it's not the Wordpress options. I just put the posts back on the homepage temporarily, and still no navigational links.
Yea , its the theme, Someone messed it up for sure, This is why I just started coding my own themes for this reason If its in there and it doesn't work, then yea, they code is messed Try another theme and see if it works
It's not working on the default theme either actually, now that I just checked. Here's the index.php file if that helps at all: <?php get_header(); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> <p class='datum'><?php the_time('F jS Y') ?> <img src="<?php bloginfo('template_directory'); ?>/images/strelica2.gif" alt='' /> <a href="<?php the_permalink() ?>">READ MORE</a> <img src="<?php bloginfo('template_directory'); ?>/images/strelica2.gif" alt='' /> <?php comments_popup_link('NO COMMENTS', '1 COMMENT', '% COMMENTS'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div> <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div> </div> <br /> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> <?php $showSidebar = TRUE; ?> <?php include(TEMPLATEPATH . '/footer.php'); ?> Code (markup):
Jenn, Its there , http://jhmattern.com/client-news/former-bodyguard-exposes-seo-secrets/2007/12/28 FXBear Releases Free MOV Video Converter Should PR Firms Write Opinion Pieces? » Former Bodyguard Exposes SEO Secrets
That's not what I want though - At the bottom of the post list at http://jhmattern.com/blog I want to see "previous" and "next" links to look at older posts, w/o having to look at category pages.
Oh, Can you give me an example Or make me a quick screen shot of what you want OR do you just want that at the bottom?
I think all of my other blogs have it. As an example look at http://allfreelancewriting.com - if you look below the list of posts at the bottom of the page, you'll see a link called "previous entries" which goes to a list of older posts. On any page but the first, there would also be a link for "next entries" to show newer posts.
Yea, On this page http://allfreelancewriting.com/2007/12/28/e-books/2008-monthly-writing-challenges/ On the bottom of the comments ↠My Thoughts on E-junkie Freelance Friday - December 28, 2007 → Is that what you mean? If so you just need to move that code to the bottom of the template
No. I don't care much about it going to the next individual post or previous individual post. What it's missing is the link to the next page of posts. For example, if you go to a blog's homepage, let's say it shows you the most recent 10 posts. When you get to the bottom, there should be some kind of link to go to the next page, which would feature the next ten posts in chronological order. Right now, there's no way for people to scroll through my recent posts like that, and that's what I'm trying to get figured out. I thought the code you mentioned before would do it, but I obviously had it confused with the individual next/previous posts instead.
Oh so you want recent posts ? Add this to your "single.php" Right before the end </div> <ul> <?php get_archives('postbypost', 10); ?> </ul><br /> PHP: Or where you want it The "10" is the limit
No... it's not something to show on single.php. I want it showing under my post list... not under individual posts. Pretty much every wordpress blog has the functionality "out of the box," but for some reason this theme I'm using doesn't, and I just can't get it to work. In the example I gave before with my writing blog, you can see it right on the home page at the very bottom. The link text itself is actually "previous entries," going to the next page of posts in the history. That's what I need on this blog - so it would have to be on the index.php template or possibly the page template associated with the blog page. Single.php shouldn't come into play.
Jennifer, I am the ONLY guy spending all this time,..... CAN YOU PLEASE be more clear on what you want.... I mean just look at the page title., I am pretty much going to code a full theme in this thread - OK OK OK You want RECENT posts>?? On the side bar? If so Go to >presentation>Themes>WIDGETS And then simple add the "recent posts" to the dynamic menu If you have NO "recent" in your "wigitized" side bar Take the code I have above and put that INTO the "sidebar.php" If this STILL isn't what you are looking for PLEASE spend 2 seconds and create ascreenshot of a blog that has it and circle it Oh BTW Thread title " No Previous or Next Page Navigation in Wordpress" I solved that issue long ago ! SCREEN SHOT below of the "widgets"
No... it has nothing to do with the sidebar (I don't think I mentioned the sidebar anywhere). I know you're trying to help, so thank you for that, but I'm not sure how to be any more clear than the example I gave with the "previous entries" link on my other blog. That's exactly what I need. What you were solving was navigation to the previous and next post. What I need is navigation to the previous and next page listing all posts. Hopefully that helps. Here's a screenshot of what I was talking about on the writing blog I mentioned before. The page in the screenshot is http://allfreelancewriting.com/page/2/. The page the "previous entries" link points to is http://allfreelancewriting.com/page/3/. The "next entries" link points to the homepage (the newest entries). That's what I need happening on the business site / blog.
Oh GAWD Ok - here we go This goes in single.php if you want it on the pages <p><?php previous_post('%', 'Previous Entries:', 'no'); ?> | <?php next_post('%', 'Next Entries:', 'no'); ?></p> PHP: This HAS to be want you want right?
I actually just got a PM before checking the thread from bjplink, saying to use: <?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?> Code (markup): and that finally has it working perfectly! Thanks so much to both of you for helping out.