Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Changing the JUGGLEDAD's multi column/custom query template (http://forum.bytesforall.com/showthread.php?t=18646)

86owen Oct 11, 2012 10:32 AM

Changing the JUGGLEDAD's multi column/custom query template
 
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.

juggledad Oct 11, 2012 12:52 PM

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.

86owen 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 ?

juggledad Oct 11, 2012 03:10 PM

when you say it is custom made, what do you mean?

86owen 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.

juggledad Oct 12, 2012 03:47 AM

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'

86owen Oct 12, 2012 05:14 AM

I think I will need some further explanation from you on that... Can you post a code example ?

juggledad Oct 12, 2012 05:58 AM

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.

86owen 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 ?

juggledad Oct 12, 2012 08:46 AM

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.

86owen 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...

juggledad Oct 12, 2012 09:16 AM

you can add any type of custom query you want - take a look at http://codex.wordpress.org/Function_...ce/query_posts

86owen 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 ?

lmilesw Oct 12, 2012 11:04 AM

Quote:

Originally Posted by 86owen (Post 91292)
One final question (I hope). Can I remove the right sidebar for this page ?

Look through the theme options for sidebars.


All times are GMT -6. The time now is 04:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.