You appear to be a bot. Output may be restricted
Description
Implement [bw_pages] shortcodePossibly the most advanced of the shortcodes in the oik base plugin. This shortcode will list items of your choosing with powerful selection and formatting criteria. This documentation doesn't do the shortcode justice! ? 2013/06/17 [bw_pages class="classes for bw_block"
- post_type='page'
- post_parent
- orderby='title'
- order='ASC'
- posts_per_page=-1
- block=true or false
- thumbnail=specification – see bw_thumbnail
- customcategoryname=custom category value
- format=formatting string
Usage
$string = bw_pages( $atts );
Parameters
- $atts
- ( array ) optional – shortcode parameters
Returns
string the generated HTML outputSource
File name: oik/shortcodes/oik-pages.phpLines:
1 to 21 of 21
function bw_pages( $atts = NULL ) { $atts['numberposts'] = bw_array_get( $atts, 'numberposts', 10 ); $cp = bw_current_post_id(); $posts = bw_get_posts( $atts ); // If we get into an infinite loop during development then you'll want to uncomment this line. //return( "shortcircuit"); bw_trace( $posts, __FUNCTION__, __LINE__, __FILE__, "posts" ); if ( $posts ) { // Don't process the current post inside the loop bw_process_this_post( $cp ); $bw_post_formatter = bw_query_post_formatter( $atts ); foreach ( $posts as $post ) { bw_current_post_id( $post->ID ); $bw_post_formatter( $post, $atts ); } } bw_current_post_id( $cp ); return( bw_ret() ); }View on GitHub View on Trac