Public Voice Network
- WTF
- Hannibal TV series 1111
- Who designed this? 33
- instagram 674674
- Superman: Man of Steel 7070
- What are you listening to… 56455645
- PS4 vs X-Box One 4949
- Black People :/ 192192
- PRISM 9292
- Halp! I need a photograph… 4646
- NBC Failure? 22
- Vid of the Day 1529915299
- Video Games... 998998
- Pic of the Day 7542575425
- FMT140613 1616
- This typeface - Terminal? 33
- blog 5785657856
- RIP James Gandolfini 3434
- Suggest a good movie... 12291229
- Four tet is Burial 1818
- I am Bradley Manning 1717
- Trailer Of The Day 818818
- RIP Tony Soprano 66
- QBN Stickers? 55
wordpress help of the day 55 Responses
Last post: 2 years, 10 months ago | Thread started: Aug 23, 10, 8:03 a.m.
- hans_glib
I rather rashly (as it turns out) agreed to help my daughter put her blog together... I thought it would be quite straightforward - find a WP theme and feck about with the CSS.
But no.
She wants the home page to have three columns - with each column for a different post category/subject - see below:
Digging around on teh interweb I found a tut (http://www.cre8d-design.com/200... that says this requires multiple loops. I can just about get my head around this but now I have fallen into a spiked pit of php (the codex page on multiple loops...) and I have no idea what the feck I am doing...
The code I have put together can be seen here:
http://www.thenewcow.com/qoobeen…
Are any of you php Heroes out there able to have a quick look and tell me if this reads ok?
Ta ever so
- Aug 23, 10, 8:03 a.m. – Permalink
- acescence
you can't use query_posts multiple times on the same page. query_posts is for modifying the main loop on a page with new parameters. for the second and third loops, you have to create new queries...
$my_second_query = new WP_Query( 'category_name=music&posts_per_p... );
while ($my_second_query->have_posts()) : $my_second_query->the_post();
// loop stuff
endwhile; endif;$my_third_query = new WP_Query( 'category_name=live&posts_per_pa... );
while ($my_third_query->have_posts()) : $my_third_query->the_post();
// loop stuff
endwhile; endif;
- Dog-earAug 23, 10, 8:46 a.m. – Permalink
- FallowDeer
im no wordpress master but I managed to get different loops working on this site http://www.ladybehave.com/blog/ using post query
But I think it is better using the above method


- Dog-earAug 23, 10, 8:52 a.m. – Permalink
- hans_glib
OK that all works really well, thanks acescence.
got another one for you... how to make WP generate a thumbnail of an image used in a post, and add it to the excerpt on the home page. I tried the "Thumbnails For Excerpts" plugin but can't seem to get it to respond properly. Any other ideas? Currently I'm on the prowl for a theme that might have this functionality built in, but any help would be much appreciated.


- Dog-earAug 24, 10, 12:33 a.m. – Permalink



