/
home
/
infinitibizsol
/
www
/
wp-content
/
themes
/
infiniti-biz-solutions
/
File Upload :
llllll
Current File: /home/infinitibizsol/www/wp-content/themes/infiniti-biz-solutions/blog-template.php
<?php /* Template Name: Blog Page */ get_header(); ?> <div class="container pt-5 pb-lg-5 pb-md-4 pb-2 my-5"> <!-- Breadcrumb--> <nav aria-label="breadcrumb"> <ol class="pt-lg-3 pb-lg-4 pb-2 breadcrumb"> <li class="breadcrumb-item"><a href="/">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Blog </li> </ol> </nav> <div class="row mb-md-2 mb-xl-4"> <!-- Blog posts--> <div class="col-lg-9 pe-lg-4 pe-xl-5"> <h1 class="pb-3 pb-lg-4">Blog</h1> <?php /* Start the Loop */ $paged = get_query_var('paged')? get_query_var('paged') : 1; // $args = [ // 'post_type' => 'post', // 'posts_per_page' => 10, // 'paged' => $paged, // ]; $myposts = get_posts( array( 'post_type' => 'post', 'posts_per_page' => 5, 'paged' => $paged, ) ); $wp_query = new WP_Query($myposts); if ( $myposts ) { foreach ( $myposts as $post ){ setup_postdata( $post ); $featured_img_url = get_the_post_thumbnail_url('full'); ?> <!-- Post--> <article class="row g-0 border-0 pt-3 pt-sm-0 mb-4"><a class="col-sm-5 bg-repeat-0 bg-size-cover bg-position-center rounded-5" href="<?php echo get_permalink();?>" style="background-image: url(<?php the_post_thumbnail_url();?>); min-height: 14rem"></a> <div class="col-sm-7"> <div class="pt-4 pb-sm-4 ps-sm-4 pe-lg-4"> <h3><a href="<?php echo get_permalink();?>" style="text-decoration: none; color: #25a6ea;"><?php echo the_title();?></a></h3> <div class="d-flex flex-wrap align-items-center pt-1 mt-n2"> <span class="fs-sm text-muted mt-2"><?php echo get_the_date(); ?></span> <span class="fs-xs opacity-20 mt-2 mx-3">|</span> <?php $categories = get_the_category(); $link = get_category_link( $categories[0]->term_id ); $category_name = $categories[0]->name; ?> <a class="badge bg-faded-primary text-primary fs-xs mt-2" href="<?php echo $link;?>"> <?php echo $category_name;?> </a> </div> <p class="d-sm-none d-md-block"> <?php echo substr(get_the_excerpt(), 0,130); ?> </p> <a class="btn btn-outline-primary btn-sm mb-2 rounded-pill" href="<?php echo get_permalink();?>">Read More</a> </div> </div> </article> <?php } } else{ get_template_part( 'template-parts/content', 'none' ); } ?> <!-- then the pagination links --> <?php wpbeginner_numeric_posts_nav($hello); ?> </div> <!-- Sidebar (offcanvas on sreens < 992px)--> <aside class="col-lg-3"> <div class="offcanvas-lg offcanvas-end" id="sidebarBlog"> <div class="offcanvas-header"> <h4 class="offcanvas-title">Sidebar</h4> <button class="btn-close ms-auto" type="button" data-bs-dismiss="offcanvas" data-bs-target="#sidebarBlog"></button> </div> <div class="offcanvas-body"> <!-- Search box--> <!--<form role="search" method="get" class="search-form" action="https://infinitibizsol.com/">--> <!--<div class="input-group rounded-pill">--> <!-- <input class="form-control" type="text" name="s" placeholder="Search...">--> <!-- <button class="btn btn-primary rounded-pill" type="submit">Search</button>--> <!--</div>--> <!--</form>--> <!-- Category links--> <h4 class="pt-1 pt-lg-0 mt-lg-n2">Categories:</h4> <ul class="nav flex-column mb-lg-5 mb-4"> <?php $categories = get_categories(); foreach($categories as $category) { ?> <!--<li class="mb-2"><a class="nav-link d-flex p-0 active" href="#">All categories<span class="fs-sm text-muted ms-2">(110)</span></a></li>--> <li class="mb-2"> <a class="nav-link d-flex p-0" href="<?php echo get_category_link($category->term_id);?>"> <?php echo $category->name;?> <span class="fs-sm text-muted ms-2"><?php echo $category->category_count;?></span> </a> </li> <?php } ?> </ul> <!-- Featured posts widget--> </div> </div> </aside> </div> </div> </main><!-- #main --> <?php get_sidebar(); get_footer();
Copyright ©2k19 -
Hexid
|
Tex7ure