'gallery-section', 'description' => esc_html__( 'Display some pages as Portfolio or Gallery.', 'foodhunt') ); $control_ops = array( 'width' => 200, 'height' =>250 ); parent::__construct( false,$name= esc_html__( 'TG: Portfolio', 'foodhunt' ), $widget_ops); } function form( $instance ) { $defaults[ 'title' ] = ''; $defaults[ 'text' ] = ''; $defaults[ 'number' ] = 8; $instance = wp_parse_args( (array) $instance, $defaults ); $title = esc_attr( $instance[ 'title' ] ); $text = esc_textarea( $instance[ 'text' ] ); $number = absint( $instance[ 'number' ] ); ?>

ID; $template_name = get_post_meta( $page_id, '_wp_page_template', true ); if( $template_name == 'page-templates/template-portfolio.php' && !in_array( $page_id , $foodhunt_duplicate_posts ) ) { array_push( $page_array, $page_id ); } } $get_featured_posts = new WP_Query( array( 'posts_per_page' => $number, 'post_type' => array( 'page' ), 'post__in' => $page_array, 'orderby' => array( 'menu_order' => 'ASC', 'date' => 'DESC' ) ) ); echo $before_widget; ?>