File manager - Edit - /home/vblioqus/bingo-patti.cc/wp-content/themes/infopediya/template-parts/home-posts.php
Back
<?php $options = get_option('Theme_Options_Panel'); $show_blog = $options['_infopediya_blog-show'] ?? true; $categories = $options['_infopediya_checkbox-categories']; if ($show_blog): $blog_position = $options['_infopediya_blog-position'] ?? 'option-1'; endif; if ($show_blog && $blog_position == 'option-1'): get_template_part('template-parts/blog', 'card'); endif; if ($categories): foreach ($categories as $category) : $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $options['opt-number-homepage-posts'] ?? 9, // 'category_name' => 'cat', 'cat' => $category, ); // The Query $the_query = new WP_Query($args); if ($the_query->have_posts()) : ?> <div class="home-section p-0"> <div class="block-head gradient row"> <div class="col-md-12"> <div class="row"> <div class="col-6"> <span class="text-white mx-1"> <img width="18" height="18" src="<?php echo get_template_directory_uri() . '/icons/file.svg' ?>" alt="file-svg-icon"> <?php echo get_the_category_by_ID($category) ?> </span> </div> <div class="col-6"> <a href="<?php echo get_home_url() . "/category/" . strtolower(get_the_category_by_ID($category)) ?>" aria-label="Read more about the category apps"> <span class="text-white alignright"> More <img width="13" height="13" src="<?php echo get_template_directory_uri() . '/icons/arrow-right.svg' ?>" alt="arrowicon"> </span> </a> </div> </div> </div> </div> <div class="block-body p-lg-3 row ml-0 mr-0"> <?php while ($the_query->have_posts()) : $the_query->the_post(); get_template_part('template-parts/content', 'app-block'); endwhile; /* Restore original Post Data */ wp_reset_postdata(); ?> </div> <!--//Apps Block --> </div> <?php else : continue; // no posts endif; endforeach; else: get_template_part('template-parts/home', 'empty'); endif; if ($show_blog && $blog_position == 'option-2'): get_template_part('template-parts/blog', 'card'); endif; ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0.99 |
proxy
|
phpinfo
|
Settings