This is a three part question.
I have created an external html page that retreives posts from my blog,What I am needing help with is this.
Let’s say I have 60 posts total. All on the same blog page.
I have #1-20 posts retreived to my custom page.
The next #20-40 I am wanting to move to a different page on wordpress. Q#1.How can I move these automatically?
The next #40-60+ I am wanting to move to an archive.
Q#2. What would be the best way of doing this? Dependant on the answer to question #3.
Question #3 On my external web page I am needing the archives to show in the left menu bar, but only the posts numbering 40+
Any Ideas would be greatly appreciated. Also if I need to clarify something please let me know I will do my best.
Thank You in advance
I know that you can query posts in wordpress, and Offset a number of them.
The example in the codex is to offset 1, so that if you are displaying the most recent post, you can automatically list your posts, without showing that first one again.
Look in the codex for Query Posts, and offset.
Your “60 posts in total” are all together on what page? If you have your “query posts” code set to …
posts_per_page=20then you’ll have your lists by 20 posts per page. Can you then query to your outside page from those wp pages? I don’t know how to code external pages, so not sure if that will help you. You can display the information IN WP any way you like, but aren’t you looking for “external page” coding help? It sounds like you need your external page to retrieve the right info. I’ve no idea how to code that!
I found an answer it will take a little more time but I will have to move the posts to something like cat 4.Then I would set up cat 1 to show posts 1-20 of cat 4, cat 2 would be set up to show posts 21-40 of cat 4, and then I would have to set up cat 3 to show posts 41+ of cat 4.
After doing this I would need to call to each cat separately form my external web page’s.
For the main section (center/body)area I would call to cat1
The left side bar/menu I would rewind the loop then make a call to cat3 for access to the older posts.
Cat2 would be called from a second web page replacing cat 1 information.
If anyone has an easier way of achieving this effect, Please let me know. Any and all ideas would be greatly appreciated.
Thank you Cathy for your quick response as well as your help.
IMHO you need to use several calls to get_posts(). It takes many args and can do all of this.
- The topic ‘Complicated web page from archives, posts’ is closed to new replies.