D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
vblioqus
/
safa777.info
/
wp-content
/
themes
/
infopediya
/
Filename :
template-blog.php
back
Copy
<?php /** * The template for displaying all pages * Template Name: Blog * @package Files_Custom_Theme */ get_header() ?> <div id="primary-m" class="content-area-m col-md-12 container"> <div class="row"> <div class="home-popular-apps row ml-0 mr-0 mb-10"> <?php $category = 'Blog'; $options = get_option('Theme_Options_Panel'); $category = $options['_infopediya_blog-category'] ?? ''; if ($category): $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $options['_infopediya_blog-num-posts'] ?? 8, 'category_name' => $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 text-capitalize"> <img width="18" height="18" src="<?php echo get_template_directory_uri() . '/icons/file.svg' ?>" alt="file-svg-icon"> <?php echo $category ?> </span> </div> <div class="col-6"> <a href="<?php echo get_home_url() . "/category/" . $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"> <div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 px-2 py-4 mx-auto"> <?php while ($the_query->have_posts()) : $the_query->the_post(); ?> <div class="col mb-4"> <div class="card h-100"> <img src="<?php echo get_the_post_thumbnail_url() ?>" class="card-img-top" alt="<?php echo infopediya_get_img_alt_text() ?>"> <div class="card-body"> <a href="<?php the_permalink() ?>"> <h5 class="card-title"><?php the_title() ?></h5> </a> <p class="card-text my-3"><?php the_excerpt() ?> </p> </div> <div class="card-footer card-read-more d-flex justify-content-end"> <a class="btn text-white btn-sm shadow-md selected-bg-color border-0" href="<?php the_permalink() ?>">Read More</a> </div> </div> </div> <?php endwhile; /* Restore original Post Data */ wp_reset_postdata(); ?> </div> </div> </div> <?php endif; else: ?> <div class="home-section p-0" style="height:100vh;"> <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"> Select Category ... </span> </div> </div> </div> </div> <div class="block-body p-lg-3 row ml-0 mr-0"> <div style="height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;"> <h3>Select category to show posts here...</h3> <a href="<?php echo get_home_url() . '/wp-admin/admin.php?page=theme-settings#tab=blog-articles' ?>" class="btn btn-primary gradient border-0 shadow-sm">Select Now</a> </div> </div> <!--//Apps Block --> </div> <?php endif; ?> </div> </div> </div><!-- #primary --> <?php get_footer();