|
#1

Oct 11, 2012, 10:32 AM
|
|
Hello
Can anybody tell me where I can change this template so that it displays ALL posts for the website ? I need a page template that displays all posts in all categories and this seems to be the perfect one.
|
#2

Oct 11, 2012, 12:52 PM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
actually you don't need this template to do that, the blog page will do that.
The WordPress blog page displays all posts from all categories. The number of posts per page is set in the dasboard->settings->reading options. But why would you want to display ALL the posts on one page. If you have a lot of posts, the wait time as the page gets built will grow as each new post is added to the site and no one (at least I wouldn't) will scroll forever.
I do think I've seen a plugin that creates a 'never ending' page of posts you might search for that.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3

Oct 11, 2012, 01:34 PM
|
|
This is just a requirement a client of mine has.
The homepage on this site is custom made, can you help add to that page the next/previous post links ?
|
#4

Oct 11, 2012, 03:10 PM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
when you say it is custom made, what do you mean?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5

Oct 12, 2012, 02:58 AM
|
|
I created a page named home.php, its just so that the news can be set up the way the client wanted on the frontpage.
I just need help with setting up the next previous post navigation.
|
#6

Oct 12, 2012, 03:47 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
ok, I see. From you original post I thought you wanted all the posts to show on the home page - ie if you had 200 pots, all 200 would show there and you would have to scroll thru them. I assume you will set a reasonable count of the number of posts to show on each page and you will use the next/previous navagation to get to them.
you can use the tmplate and add a custom field called 'custom_query' and put a custom query in the value field, something like 'post_status=published'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7

Oct 12, 2012, 05:14 AM
|
|
I think I will need some further explanation from you on that... Can you post a code example ?
|
#8

Oct 12, 2012, 05:58 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
that is the example - edit the page (your 'Home' page) select the template and then in the section 'Custom Fields' add an new field 'custom_query' and add the value above.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#9

Oct 12, 2012, 07:41 AM
|
|
I don't have any specific page in my pages section as the Home page so I guess I need the code to set into my home.php template, isn't that possible ?
|
#10

Oct 12, 2012, 08:46 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
IF you have created a separate home.php file and added it to the theme files, this won't work. The themplate is designed to be use with a page you create in wordpress. In the dashboard->page->edit page there is a section on the right to apply a template to the page. That is where you pick the tplate to use with the page.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11

Oct 12, 2012, 08:55 AM
|
|
Ok, I'll just create a page for all posts and use your custom query template. Can I also control there how many posts appear on that page before the next/previous link appears ? I have this defined as 6 posts in the settings but for this specific page I would like more posts to appear...
|
#12

Oct 12, 2012, 09:16 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
you can add any type of custom query you want - take a look at http://codex.wordpress.org/Function_...ce/query_posts
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#13

Oct 12, 2012, 10:19 AM
|
|
Ok, very good ! Thank you for this Juggledad
One final question (I hope). Can I remove the right sidebar for this page ?
|
#14

Oct 12, 2012, 11:04 AM
|
 |
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
Quote:
Originally Posted by 86owen
One final question (I hope). Can I remove the right sidebar for this page ?
|
Look through the theme options for sidebars.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
|