Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter yanick.rochon

    (@yanickrochon)

    Here’s a basic support implementation :

    pulic static function siblings( $atts = null, $content = null ) {
      $atts = shortcode_atts( array(
          'depth' => 1,
          'class' => '',
          'include_current' => 0,
          'sort' => ''
        ), $atts, 'siblings' );
      global $post;
      $return = wp_list_pages( array( 'title_li' => '',
          'echo' => 0,
          'child_of' => $post->post_parent,
          'depth' => $atts['depth'],
          'exclude' => (int) $atts['include_current'] ? '' : $post->ID,
          'sort_column' => $atts['sort']
        ) );
      return ( $return ) ? '<ul class="su-siblings' . su_ecssc( $atts ) . '">' . $return . '</ul>' : false;
    }

    Shortcode

    [su_siblings depth="0" include_current="1" sort="menu_order"]

    Thread Starter yanick.rochon

    (@yanickrochon)

    I’m not sure what I did, but now it works. Don’t ask, really… it may be after I uploaded the file again (O_o). Anyway. Sorry that I have bothered with it.

Viewing 2 replies - 1 through 2 (of 2 total)