Description
Create a simple list of posts, defaulting to recent posts if no parms specifiedExamples: [bw_posts] [bw_posts post_type='post' category_name='news' orderby='post_date' order='DESC' numberposts=8]
Usage
$string = bw_posts( $atts );Parameters
- $atts
- ( array ) optional –
Returns
string result of bw_list()Source
File name: oik/shortcodes/oik-posts.phpLines:
1 to 16 of 16
function bw_posts( $atts = NULL ) { $atts['post_type'] = bw_array_get( $atts, "post_type", "post" ); $atts['orderby'] = bw_array_get($atts, "orderby", "post_date" ); $atts['order'] = bw_array_get( $atts, "order", "DESC" ); $atts['numberposts'] = bw_array_get( $atts, "numberposts", 10 ); switch ( $atts[ 'orderby'] ) { case "post_date": $default_parent = 0; break; default: $default_parent = bw_global_post_id(); break; } $atts['post_parent'] = bw_array_get( $atts, "post_parent", $default_parent ); return( bw_list( $atts )) ; }View on GitHub View on Trac
Called by
Invoked by
Calls
1 to 3 of 3
