*/ // Get the options. $section9_title = stripslashes( get_theme_mod( 'canuck_section9_title', '' ) ); $section9_text = stripslashes( get_theme_mod( 'canuck_section9_text', '' ) ); $section9_portfolio_category = get_theme_mod( 'canuck_section9_portfolio_category', '' ); $section9_portfolio_columns = get_theme_mod( 'canuck_section9_portfolio_columns', '3' ); $sec9_bg_image = get_theme_mod( 'canuck_section9_background_image', '' ); $sec9_use_parallax = get_theme_mod( 'canuck_section9_use_parallax', false ); $include_pinterest_pinit = get_theme_mod( 'canuck_include_pinit' ) ? true : false; if ( '' !== $sec9_bg_image && false !== $sec9_use_parallax ) { ?>
'; echo '

' . wp_kses_post( $section9_title ) . '

'; echo '
'; } if ( '' !== $section9_text ) { echo '
'; echo '

' . wp_kses_post( $section9_text ) . '

'; echo '
'; } ?>
$category_id, 'numberposts' => 20, ); $custom_posts = get_posts( $args ); if ( false != $category_id && $custom_posts ) {// Non strict is required $canuck_feature_pic_count = 0; foreach ( $custom_posts as $post ) { setup_postdata( $post ); $link_to_post = ( '' === get_post_meta( $post->ID, 'canuck_metabox_link_to_post', true ) ? false : true ); $custom_feature_link = ( '' === get_post_meta( $post->ID, 'canuck_custom_feature_link', true ) ? false : get_post_meta( $post->ID, 'canuck_custom_feature_link', true ) ); $image_url = get_the_post_thumbnail_url( $post->ID, 'canuck_med15' ); $image_caption = get_post( get_post_thumbnail_id() ) -> post_excerpt; $image_desc = get_post( get_post_thumbnail_id() ) -> post_content; if ( has_post_thumbnail() ) { $canuck_feature_pic_count ++; ?>
'; } else { echo '' . esc_attr( $image_caption ) . ''; } ?>
'; } if ( false !== $custom_feature_link ) { echo ''; } elseif ( true === $link_to_post ) { echo ''; } echo ''; ?>
'; } } elseif ( 4 === $section9_portfolio_columns ) { if ( is_int( ( $canuck_feature_pic_count ) / 4 ) ) { echo '
'; } } } } else { ?>