The key to beginning to understand this is using the loop multiple times. Look in the Codex here. The loop has to be rewound so it can go again. Then u can put multiple instances on a page and wrap yr layout around them.
can you show me an example please :D, am still a novice and eager to learn that
all the expo and examples are here
http://codex.wordpress.org/The_Loop
thanks, i’ll have a look and learn from this point and revert back if need be.
Thank you for taking the time answering my question
Ben
For yr level of functionality you need to understand the loop and its variables. Its all there.
Hi Ben,
I tried emailing you after your contacted me through my blog but my Gmail emails are being bounced.
The exact code will depend on your particular situation but the basic idea is to use multiple WordPress loops for the different areas of the page you’re displaying content in and PHP “switch” code to alternate in the different columns.
Rachel
Wow, hi Rachel how did you found me from nowhere 🙂
Thanks indeed to channel me thru the right tunnel…I’ll have a read on multiple loops as you both have suggested and hope to be able to help myself to solve this problem.
Cheers
Ben
Hey there
Now I’ve read about the loop etc . I’ve succeeded to create custom post types noe and my main concern now is to publish this post on my homepage with a particular css. I read about how to query such post but I’m getting mingled. can yu help me please I’m testing the twentyten theme here http://test.infografixlab.com/
My custom post type is here http://test.infografixlab.com/?page_id=22
Please help me with the codes.
thanks
Ben
What I want to do is to have normal post as well as custom post types on the homepage or numerous custom post types as depicted here http://www.infografixlab.com/deploy/screen.jpg
Please help me guys :))
<?php
if( is_home() ){
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
query_posts( array(‘post_type’=>array( ‘post’, ‘linkpost’),’paged’=>$paged ) );
}
?>
is that the correct code yo input in the index.php? Or shall I use a static homepage? How to do it with the various types of posts I’ve got (from my screenshot (http://www.infografixlab.com/deploy/screen.jpg)?
I figured it out now I need to get those custom posts styled on my homepage!
Can you help me on this one pls?
Am using this piece of code to display my custom posts on the homepage
add_filter( ‘pre_get_posts’, ‘my_get_posts’ );
function my_get_posts( $query ) {
if ( is_home() && false == $query->query_vars[‘suppress_filters’] )
$query->set( ‘post_type’, array( ‘post’, ‘page’, ‘album’, ‘movie’, ‘quote’, ‘attachment’ ) );
return $query;
}
When I use this piece of code in WP 3.03, it displays perfectly on the homepage. But when I’m assigning a page template for the custom post type to a page is displays all the custom posts like on the homepage. Is there a way to suppress that function allowing the display of selected custom posts only on the homepage while the other pages display only the assigned page template?
Anyone