Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Limiting the home page to one (most recent) post (http://forum.bytesforall.com/showthread.php?t=2702)

cbmrj777 Jul 28, 2009 01:40 PM

Limiting the home page to one (most recent) post
 
URL: http://hoguesandkisses.com/

I want to display only one post on the home page and all other pages (archives, etc.) display 5 posts (or whatever amount I want - just more than 1).

I made a home.php using the index.php file and added this code that I found in the Wordpress.org forums like this:

Code:

<!-- Limit the home page to display only one (the latest) post -->
        <?php query_posts('showposts=1'); ?>

above this:
Code:

<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] == 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>

And under Wordpress admin Reading Settings I have it set "Blog pages show at most" 5 posts.

It does exactly what I want: display 1 post on the home page BUT

when I click on the "older entries" link, I see the same 1 (most recent) post. And only 1 post. I want those pages to go to the 5 posts per page display. The archives pages do show 5 posts, though.

I am unsure how to do this...

Thanks for any help! :)

cbmrj777 Jul 30, 2009 04:21 PM

Just an update...

I found this plugin
Custom Query String and it works in that now the home page displays 1 post and you can click on "Older Entries" / "Newer Entries" and they go to posts that they are suppose to go to. BUT (there's that "but" again :p ) the subsequent pages only display 1 post when I would like them to display more than 1. Is this even possible? I know now this is a WordPress general question (not a theme question) but I was hoping someone might know the answer anyway... :o

Thank you! :)

juggledad Jul 31, 2009 05:45 AM

A simpler fix would be to edit index.php and add check to see if it is the homepage i.e.
HTML Code:

        <?php if (is_front_page()) query_posts('showposts=1'); ?>

cbmrj777 Jul 31, 2009 10:39 AM

Hi!

I just tried that and it didn't work. It does limit the front page to 1 post but when clicking "Older Entries" you get the same most recent single post. :confused:

Thanks!

juggledad Jul 31, 2009 11:07 AM

did you remove the other things you did?

cbmrj777 Jul 31, 2009 11:14 AM

Yes... I deleted the home.php file and deactivated the CSQ plugin. :)

(right now it is reactivated just so my links work for visitors. I can deactivate now, though, so you can see what it does... )

juggledad Jul 31, 2009 11:27 AM

use this, it works
HTML Code:

if (is_front_page() && !is_paged()) query_posts('showposts=1'); ?>

cbmrj777 Jul 31, 2009 11:37 AM

That sorta works but when you click "Older Entries" it skips 9 posts (posts #265 to 281) then the 11th most recent post...

juggledad Jul 31, 2009 01:55 PM

Yup, your right and at this point I've spent too much time on this. If you want me to look into it more send me a PM and I'll quote you a price.

moowens Jan 28, 2011 04:42 PM

Hello, thanks for the info above very helpful.

However, i don't want the full post to be displayed, instead i need the post to stop at the 'continue reading point'.

So basically i want to show the most recent 'multi page post' on the home page.

Any ideas? I've spend the last 4 hours trying stuff out but nothing is taking.

Thanks so much

my url: http://www.marcowens.co.uk/wordpress/

lmilesw Jan 28, 2011 06:39 PM

Have you tried using the excerpts field on posts and played with the setting in the excerpts options of the theme?

moowens Jan 28, 2011 06:47 PM

Thanks for your reply.

Yeah, i've tried changing the settings, but as i understand there is a difference between a 'multi page post' and an excerpt.

Am i right in thinking this?

Any other ideas?

sleizure Jan 28, 2011 07:35 PM

I had the same question for my website.
http://coffee2code.com/wp-plugins/custom-post-limits/ should sort you out!

-d www.tiredofit.ca

lmilesw Jan 28, 2011 09:12 PM

Quote:

Originally Posted by moowens (Post 56223)
Thanks for your reply.

Yeah, i've tried changing the settings, but as i understand there is a difference between a 'multi page post' and an excerpt.

Am i right in thinking this?

Any other ideas?

Do you want a post that has multiple pages in it or do you want to show an excerpt that when you click on read more you see the whole post? In other words I am confused as to what your are trying to do.

moowens Feb 8, 2011 02:22 PM

Basically i am just looking to get the most recent post (as it appears here http://www.marcowens.co.uk/wordpress/?page_id=2 on my blog page) on the home page here http://www.marcowens.co.uk/wordpress

Currently it shows the whole post but i just want the bit before and including 'continue reading'

Just cant work it out.

Any help would be amazing

Thanks so much.

lmilesw Feb 8, 2011 03:16 PM

In ATO>Configure Excerpts how do you have "Posts or excerpts on HOME page?" set?

moowens Feb 8, 2011 03:27 PM

I have just changed it but this is not what i am looking for.

It only shows an excerpt. Look:http://www.marcowens.co.uk/wordpress/

What i am looking for is a single post that looks like one of these: http://www.marcowens.co.uk/wordpress/?page_id=2

Not the same thing right?

Any ideas?

lmilesw Feb 8, 2011 09:03 PM

You might have to use a featured image or put <img> in the "Don't strip these tags" box in the configure excerpts section.


All times are GMT -6. The time now is 01:25 AM.

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