开发者

Wordpress Post # of #

I'm looking for an easy way to assign a post number to each post in wordpress and display it out of the total number of posts. A little info:

  1. There will be about 100 "posts", each on its own page
  2. I want users to click through each post, so start at post 1 and click "next post" to get to post 2
  3. I want it to say post 4/10开发者_JS百科0 at the top for each post
  4. I want the URL to have the post name in it

I was going to use WP-PageNavi and set each page to display 1 post, however I need the url to show /post-name/ and not /page/2/

I know I can count total number of posts pretty easily, any idea how I can assign a number to each post without having to do it manually? I'd like to sort by date added.


You may be looking at the problem from the wrong angle. A post url contains post-name, so you need to change your previous/next nav links to go to the previous/next post rather than the previous/next index page.


This is exactly what I wanted:

http://wordpress.org/support/topic/375293?replies=5

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜