public function widget($args, $instance) { $id = intval($instance['pageid']); $style1 = (string) NULL; $style2 = (string) NULL; $style3 = (string) NULL; global $wp_query; $type = get_post_type($id); $main_post = $wp_query->get_queried_object(); if ($id > 0 && $type == 'page' && $id != $main_post->ID) { echo maskitto_light_generate_page($id, 1); } }
?> <?php while (have_posts()) { the_post(); if (function_exists('is_bbpress') && is_bbpress()) { ?> <div class="container" style="padding: 45px 0;"> <?php echo the_content(); ?> </div> <?php } else { $comments = get_post_meta(get_the_ID(), 'wpcf-comments', true); echo maskitto_light_generate_page(get_the_ID()); wp_reset_postdata(); echo maskitto_light_get_widgets(get_the_content()); } ?> <?php if (isset($comments) && $comments == 1) { ?> <div class="page-section" style="padding: 50px 0!important;"> <div class="container page-list"> <?php if (!isset($maskitto_light['blog-layout']) || $maskitto_light['blog-layout'] == 1) { ?> <div class="blog-layout-2"> <?php