joe_doufu
Member
Posted 7 years ago #
I want to show only one post on my site, the most recent one, and then show several others as headlines + links only. (Just omit running <?php the_content(); ?> for those).
Also, when a user clicks for my "archives" or does a search, I want ALL the records to display headline + links only.
So the content should only be displayed if it is the very most recent headline or if somebody has linked to it directly.
Anybody know how to do it?
My solution requires a bit of tweaking.
Inside the loop, have a counter with a if. While the counter = 1, use all tages (the_content(), ...). As soon as counter > 1, do not have the_content, ... or have even a very different output....
Anonymous
Unregistered
Posted 7 years ago #
As a newbie, I'm not sure what that means - could you code it out?
joe_doufu
Member
Posted 7 years ago #
I agree, that's the easy way. Somehow I want to make it so that on an "archives" or "search" query it won't even show the first one. Thanks!
joe_doufu
Member
Posted 7 years ago #
I've got it working satisfactorily on my http://www.joeclark.net now. I'm not a great graphic designer so I'll tweak it more, but I've achieved that objective. Email me if you want to know about it.
Joe,
i went to your site and couldn't find any contact info but your various IM settings. I've added you to my aim list, but dinnae see you about.
Your top content, list of titles below is E X A C T L Y the way i'd like to present my archives.
i've searched all over the place for more information about this for 1.3 but haven't found anything but questions.
the 1.3 archive pages are different than 1.2 and below.
Especially using Kubrick for 1.3
i'd love to see how you did that!
F.
I was interested in building a headline based site, such as superbikeplanet.com. I'm having trouble in just displaying the headline only on the first page. Any help would be greatly appreciated.
Delete the_content tag from The Loop in your index.php (and anything else except the title+permalink).
Warning: it will work only in a theme where you have separate archive, single etc. templates.
Another solution is to use a home.php which takes precedence over the index = meaning that's the one that will serve as your "main" page.
This is what I did:
1) Set the number of posts per page to 1, then used this plugin by coffee2code to make like 10 or so post titles after that:
http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/
2) Then I used this plugin to set the number of posts per page in the archives to around 10: http://rephrase.net/miscellany/05/perpage.phps
Hopefully that helps, you can't see it on my site right now cuz I am doing a redesign and only have the default template up.
basketball -- seems a bit extreme for something that should be so simple..... but that's proly just me.
Tg
-i'm not really here. this is just a figment of your imagination.-
These are not the gnomes you're looking for.
[waves hand]
Thanks to Moshu and basketall. Hi to Techgnome, Kafkaesqui, and davidchait. I have another problem now that is giving me gray hairs. It is possible to categorize posts by dates (exampled by superbikeplanet.com) then being sub-categorized by a title? I suppose that a piece of code would go above the loop but I am a bit clueless on what needs to be done.
[dressed in penguin suit]Youuuu didn't seee anything.....
tshirt,
I am not sure I understand you request correctly, but aren't the posts by default "categorized" by date?
It is just a matter of what template tag are you using (and where) in your index.php to display the dta/time of posting.
See details here: http://codex.wordpress.org/Template_Tags/the_date
tshirt, as moshu points out posts *are* organized by date. WordPress offers two methods of organization for posts: category, and date-based archives. If you're just looking to link in the latter manner, look at the get_archives() / wp_get_archives() template tags, which provide date-based listings of posts:
http://codex.wordpress.org/Template_Tags/get_archives
http://codex.wordpress.org/Template_Tags/wp_get_archives
Important note: Starting a new topic in a thread is not good karma. All sorts of ways it can get lost in the fog. In future, stick to this math for best results: new topic = new forum post.
I'd like to use this plugin ( http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/ ) but i can't get it to work.
On my mainpage i would like 5 posts (with read more) and below it the headlines off 25 other posts (preferrable with time/date in front).
Iam using the Blix theme and wp1.5.2
What i did:
- Download & Upload the plugin
- Activate it
- Pasted one of the funtions above into the index.php in the exerp(not the regular index.php but the one into the provided by blix, in the same folder as the side bar).
When i reload the page i get an error.
Could you please help me out?
Figured it out.
Is it possible with this plugin to show the time as well?
Done it :)
I now have 1 post per categorie + 10 (or 5) headlines below the category post. All on the indexpage :)
http://www.nieuwszicht.com/