Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1551 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Development Software and Tools :

Wordpress

Thread title: Wordpress
Closed Thread    
    Thread tools Search this thread Display Modes  
10-22-2006, 08:14 PM
#1
Jeff Andersen is offline Jeff Andersen
Status: Superstar
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 4,449
iTrader: 10 / 100%
 

Jeff Andersen is on a distinguished road

  Old  Wordpress

Could anyone shed some light on how to make a wordpress 'featured' post?
So that the newest post on the front page has say, a special background and border or something different than the rest.

Thanks

10-22-2006, 08:30 PM
#2
Awesome is offline Awesome
Awesome's Avatar
Status: Pastafarian
Join date: May 2006
Location: Duct Taped to your Ceiling
Expertise:
Software:
 
Posts: 3,440
iTrader: 26 / 93%
 

Awesome is on a distinguished road

  Old

Query the posts with two seperate loops.. The first to show one post, and the second loop queires all the rest.

For the second loop use get_posts()

10-22-2006, 09:18 PM
#3
Edder is offline Edder
Status: I love this place
Join date: Dec 2005
Location: Bay Area, CA
Expertise:
Software:
 
Posts: 734
iTrader: 13 / 100%
 

Edder is on a distinguished road

  Old

Chris, would you also know how to display a recent list of posts? I've always wondered how..

(e.g. http://www.thebigchris.com/)

10-22-2006, 09:41 PM
#4
Awesome is offline Awesome
Awesome's Avatar
Status: Pastafarian
Join date: May 2006
Location: Duct Taped to your Ceiling
Expertise:
Software:
 
Posts: 3,440
iTrader: 26 / 93%
 

Awesome is on a distinguished road

  Old

I would assume he is just quering the remaining posts with a second loop, but instead of the_post using the excerpt. Should look something like:

Code:
<?php while (have_posts()) : the_excerpt(); ?>
I'd have to have a theme infront of me to try it on to be sure though.

10-22-2006, 09:43 PM
#5
JamesH is offline JamesH
JamesH's Avatar
Status: Request a custom title
Join date: Apr 2006
Location: US
Expertise:
Software:
 
Posts: 2,802
iTrader: 7 / 100%
 

JamesH is on a distinguished road

  Old

@edder

Download this theme and check out the source code: http://warpspire.com/hemingway

It has all the code you need to show the most recent post, archives, and much more.

10-22-2006, 10:08 PM
#6
Shanks is offline Shanks
Status: Senior Member
Join date: Oct 2005
Location:
Expertise:
Software:
 
Posts: 891
iTrader: 1 / 100%
 

Shanks is on a distinguished road

  Old

I believe that in /wp-content/themes/[insert-theme-name-here]/index.php you replace

<div class="post" id="post-<?php the_ID(); ?>">
with

<div class="post<?php if(!is_single() && $post==$posts[0]) echo ' firstpost';?>" id="post-<?php the_ID(); ?>">
Add a .firstpost class to your stylesheet and style the first post as you wish. I picked this up on the wordpress.org support forums, but the link to the specific thread escapes me at the moment. Here's a crude example: http://retromonkey.org/blog/.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed