Turn post into simple slideshow
Turn post into simple slideshow
Turn post into simple slideshow
You can use something like $wp_query->found_posts to get the number of posts in the loop. if( $wp_query->found_posts > 1 ){ // add css for multiple posts }
That depends. There is the_post_thumbnail which will echo the “featured” image and get_children can grab all attachments. Certain kinds of images aren’t attached though, so you can’t easily get those. Reference http://codex.wordpress.org/Function_Reference/the_post_thumbnail http://codex.wordpress.org/Function_Reference/get_children
Well for one thing I can spot that it seems your endwhile loop is closing OUTSIDE of a stray DIV tag. Try fixing that.
The codex explains how you could achieve multiple loops on one page. http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action You could use categories in $query_args to separate out the different loops for the design you have.
Get last 5 days with posts
So I thought it wouldn’t be a bad idea to use this same function for all of my external widgets. (am I wrong here???) If you are comfortable looking at PHP code to get the argument list of each widget, if you are trying to make it more difficult for you (or other admins) to … Read more
The problem is not that the loop is not working. The problem is your code is not executing the loop the way you want it to. PHP does not do what you mean. It does exactly what you tell it to do. Like most computer languages, it is just an extremely fast and incredibly dumb … Read more
You would want to use something like this: $query = new WP_Query( ‘year=2013&monthnum=12&day=20&cat=5’ ); // change cat=5 to the ID of the category you want to query from. // change year to the year you want // change monthnum to the month you want // change day to the day you want // start the … Read more
What is the code on line 3645? You didn’t specify. From what I see in your code, $transient_name should be something like “_my_post_list_transient” – a string. If $transient_name is returning a post object, then your call to this function may be the problem.