Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Limiting the home page to one (most recent) post


  #1  
Old Jul 28, 2009, 02:40 PM
cbmrj777's Avatar
cbmrj777
 
5 posts · Jul 2009
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!
  #2  
Old Jul 30, 2009, 05:21 PM
cbmrj777's Avatar
cbmrj777
 
5 posts · Jul 2009
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 ) 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...

Thank you!
  #3  
Old Jul 31, 2009, 06:45 AM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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'); ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Jul 31, 2009, 11:39 AM
cbmrj777's Avatar
cbmrj777
 
5 posts · Jul 2009
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.

Thanks!
  #5  
Old Jul 31, 2009, 12:07 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
did you remove the other things you did?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old Jul 31, 2009, 12:14 PM
cbmrj777's Avatar
cbmrj777
 
5 posts · Jul 2009
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... )
  #7  
Old Jul 31, 2009, 12:27 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
use this, it works
HTML Code:
if (is_front_page() && !is_paged()) query_posts('showposts=1'); ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Jul 31, 2009, 12:37 PM
cbmrj777's Avatar
cbmrj777
 
5 posts · Jul 2009
That sorta works but when you click "Older Entries" it skips 9 posts (posts #265 to 281) then the 11th most recent post...

Last edited by cbmrj777; Jul 31, 2009 at 02:00 PM.
  #9  
Old Jul 31, 2009, 02:55 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old Jan 28, 2011, 05:42 PM
moowens
 
6 posts · Oct 2009
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/
  #11  
Old Jan 28, 2011, 07:39 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
Have you tried using the excerpts field on posts and played with the setting in the excerpts options of the theme?
__________________
~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.
  #12  
Old Jan 28, 2011, 07:47 PM
moowens
 
6 posts · Oct 2009
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?
  #13  
Old Jan 28, 2011, 08:35 PM
sleizure
 
13 posts · May 2009
I had the same question for my website.
http://coffee2code.com/wp-plugins/custom-post-limits/ should sort you out!

-d www.tiredofit.ca
  #14  
Old Jan 28, 2011, 10:12 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
Quote:
Originally Posted by moowens
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.
__________________
~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.
  #15  
Old Feb 8, 2011, 03:22 PM
moowens
 
6 posts · Oct 2009
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.
  #16  
Old Feb 8, 2011, 04:16 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
In ATO>Configure Excerpts how do you have "Posts or excerpts on HOME page?" set?
__________________
~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.
  #17  
Old Feb 8, 2011, 04:27 PM
moowens
 
6 posts · Oct 2009
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?
  #18  
Old Feb 8, 2011, 10:03 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
You might have to use a featured image or put <img> in the "Don't strip these tags" box in the configure excerpts section.
__________________
~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.

Bookmarks

Tags
home page, limit posts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Recent posts of same category, on single post pages GeoParadise Atahualpa 3 Wordpress theme 10 Apr 19, 2010 09:54 AM
Link to most recent post in page menu bar JocSch Page & Category Menu Bars 2 Apr 13, 2010 09:17 AM
recent posts in the right sidebar, but not on the home page ind Sidebars & Widgets 1 May 6, 2009 04:49 AM
Post on home page using permalinks - I have them off RickyRobi Atahualpa 3 Wordpress theme 2 Apr 9, 2009 05:33 AM
[SOLVED] How to show single post special category on static home page?? Shepherd Jim Post-Kicker, -Byline & -Footer 5 Mar 19, 2009 08:42 AM


All times are GMT -6. The time now is 06:23 PM.


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