Commit 9cf86c99 by rajshah

views fixed in archive blogs layout

parent 5374b31f
......@@ -8,7 +8,7 @@ $currentObject = get_queried_object();
<div class="row">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo site_url('/');?>">Home</a></li>
<li class="breadcrumb-item"><a href="<?php echo site_url('/'); ?>">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Blog</li>
</ol>
</nav>
......@@ -20,11 +20,11 @@ $currentObject = get_queried_object();
<div class="container">
<div class="row justify-content-between">
<div class="col-lg-3 pb-60 title-wrapper">
<!-- <h1><?php echo $currentObject->name;?></h1> -->
<!-- <h1><?php echo $currentObject->name; ?></h1> -->
<h1>Blog</h1>
</div>
<div class="col-lg-6 pb-60 paragraph">
<!-- <p><?php echo get_the_excerpt();?></p> -->
<!-- <p><?php echo get_the_excerpt(); ?></p> -->
<p><?php echo get_field('arch_description', 'option'); ?></p>
</div>
</div>
......@@ -34,70 +34,76 @@ $currentObject = get_queried_object();
<div class="container">
<div class="row justify-content-between">
<div class="col-lg-2 col-12 left-filter">
<?php get_sidebar();?>
<?php get_sidebar(); ?>
</div>
<div class="col-lg-10 col-12 blog-list">
<div class="row ">
<?php while(have_posts()):the_post();?>
<div class="col-lg-6 col-md-6">
<div class="blog-card">
<a href="<?php the_permalink();?>">
<div class="blog-image-wrapper">
<?php the_post_thumbnail();?>
</div>
<!--<p class="text-dark mb-0">Author: <?php echo get_the_author(); ?></p>-->
<div class="text-wrapper">
<p>
<?php
$post_tags = get_the_tags();
if ($post_tags) {
foreach ($post_tags as $tag) {
echo $tag->name . ',';
}
}
?>
<h6><?php the_title();?></h6>
<?php the_excerpt();?>
<div class="card-detail d-flex justify-content-between">
<div><svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M16.25 3.625H3.75C3.40482 3.625 3.125 3.90482 3.125 4.25V16.75C3.125 17.0952 3.40482 17.375 3.75 17.375H16.25C16.5952 17.375 16.875 17.0952 16.875 16.75V4.25C16.875 3.90482 16.5952 3.625 16.25 3.625Z"
stroke="#005AFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M13.75 2.375V4.875" stroke="#005AFF" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M6.25 2.375V4.875" stroke="#005AFF" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M3.125 7.375H16.875" stroke="#005AFF" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
</svg>
<?php echo get_the_date('d, M Y');?></div>
<div><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M10 4.375C3.75 4.375 1.25 10 1.25 10C1.25 10 3.75 15.625 10 15.625C16.25 15.625 18.75 10 18.75 10C18.75 10 16.25 4.375 10 4.375Z"
stroke="#005AFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path
d="M10 13.125C11.7259 13.125 13.125 11.7259 13.125 10C13.125 8.27411 11.7259 6.875 10 6.875C8.27411 6.875 6.875 8.27411 6.875 10C6.875 11.7259 8.27411 13.125 10 13.125Z"
stroke="#005AFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<?php echo (int) get_post_meta(get_the_ID(),'total_views')??0;?> Views</div>
<div class="d-none">
<svg width="18" height="15" viewBox="0 0 18 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M4.60515 6C3.99821 6 3.50786 6.44688 3.50786 7C3.50786 7.55312 3.99821 8 4.60515 8C5.2121 8 5.70245 7.55312 5.70245 7C5.70245 6.44688 5.2121 6 4.60515 6ZM8.44569 6C7.83875 6 7.3484 6.44688 7.3484 7C7.3484 7.55312 7.83875 8 8.44569 8C9.05264 8 9.54299 7.55312 9.54299 7C9.54299 6.44688 9.05264 6 8.44569 6ZM12.2862 6C11.6793 6 11.1889 6.44688 11.1889 7C11.1889 7.55312 11.6793 8 12.2862 8C12.8932 8 13.3835 7.55312 13.3835 7C13.3835 6.44688 12.8932 6 12.2862 6ZM8.44569 0.5C3.59701 0.5 -0.332685 3.40937 -0.332685 7C-0.332685 8.4875 0.349697 9.85 1.48128 10.9469C0.970356 12.1781 -0.0926513 13.2219 -0.109797 13.2344C-0.336114 13.4531 -0.397837 13.7719 -0.267533 14.0469C-0.137229 14.3219 0.161099 14.5 0.490288 14.5C2.59916 14.5 4.26225 13.6969 5.2601 13.0531C6.2511 13.3375 7.32096 13.5 8.44569 13.5C13.2944 13.5 17.2241 10.5906 17.2241 7C17.2241 3.40937 13.2944 0.5 8.44569 0.5ZM8.44569 12C7.53014 12 6.62487 11.8719 5.75732 11.6219L4.97892 11.3969L4.31025 11.8281C3.8199 12.1438 3.14781 12.4969 2.33855 12.7344C2.58887 12.3562 2.83233 11.9312 3.02093 11.4781L3.38441 10.6L2.67802 9.91875C2.05737 9.31563 1.31326 8.31875 1.31326 7C1.31326 4.24375 4.51257 2 8.44569 2C12.3788 2 15.5781 4.24375 15.5781 7C15.5781 9.75625 12.3788 12 8.44569 12Z"
fill="#005AFF" />
</svg>
<?php while (have_posts()):
the_post(); ?>
<div class="col-lg-6 col-md-6">
<div class="blog-card">
<a href="<?php the_permalink(); ?>">
<div class="blog-image-wrapper">
<?php the_post_thumbnail(); ?>
</div>
<!--<p class="text-dark mb-0">Author: <?php echo get_the_author(); ?></p>-->
<div class="text-wrapper">
<p>
<?php
$post_tags = get_the_tags();
if ($post_tags) {
foreach ($post_tags as $tag) {
echo $tag->name . ',';
}
}
?>
<h6><?php the_title(); ?></h6>
<?php the_excerpt(); ?>
<div class="card-detail d-flex justify-content-between">
<div><svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M16.25 3.625H3.75C3.40482 3.625 3.125 3.90482 3.125 4.25V16.75C3.125 17.0952 3.40482 17.375 3.75 17.375H16.25C16.5952 17.375 16.875 17.0952 16.875 16.75V4.25C16.875 3.90482 16.5952 3.625 16.25 3.625Z"
stroke="#005AFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M13.75 2.375V4.875" stroke="#005AFF" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M6.25 2.375V4.875" stroke="#005AFF" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M3.125 7.375H16.875" stroke="#005AFF" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
</svg>
<?php echo get_the_date('d, M Y'); ?></div>
<div><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M10 4.375C3.75 4.375 1.25 10 1.25 10C1.25 10 3.75 15.625 10 15.625C16.25 15.625 18.75 10 18.75 10C18.75 10 16.25 4.375 10 4.375Z"
stroke="#005AFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path
d="M10 13.125C11.7259 13.125 13.125 11.7259 13.125 10C13.125 8.27411 11.7259 6.875 10 6.875C8.27411 6.875 6.875 8.27411 6.875 10C6.875 11.7259 8.27411 13.125 10 13.125Z"
stroke="#005AFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<?php
$views = do_shortcode('[post-views]');
$views = wp_filter_nohtml_kses($views);
echo esc_html($views) . ' Views';
?>
</div>
<div class="d-none">
<svg width="18" height="15" viewBox="0 0 18 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M4.60515 6C3.99821 6 3.50786 6.44688 3.50786 7C3.50786 7.55312 3.99821 8 4.60515 8C5.2121 8 5.70245 7.55312 5.70245 7C5.70245 6.44688 5.2121 6 4.60515 6ZM8.44569 6C7.83875 6 7.3484 6.44688 7.3484 7C7.3484 7.55312 7.83875 8 8.44569 8C9.05264 8 9.54299 7.55312 9.54299 7C9.54299 6.44688 9.05264 6 8.44569 6ZM12.2862 6C11.6793 6 11.1889 6.44688 11.1889 7C11.1889 7.55312 11.6793 8 12.2862 8C12.8932 8 13.3835 7.55312 13.3835 7C13.3835 6.44688 12.8932 6 12.2862 6ZM8.44569 0.5C3.59701 0.5 -0.332685 3.40937 -0.332685 7C-0.332685 8.4875 0.349697 9.85 1.48128 10.9469C0.970356 12.1781 -0.0926513 13.2219 -0.109797 13.2344C-0.336114 13.4531 -0.397837 13.7719 -0.267533 14.0469C-0.137229 14.3219 0.161099 14.5 0.490288 14.5C2.59916 14.5 4.26225 13.6969 5.2601 13.0531C6.2511 13.3375 7.32096 13.5 8.44569 13.5C13.2944 13.5 17.2241 10.5906 17.2241 7C17.2241 3.40937 13.2944 0.5 8.44569 0.5ZM8.44569 12C7.53014 12 6.62487 11.8719 5.75732 11.6219L4.97892 11.3969L4.31025 11.8281C3.8199 12.1438 3.14781 12.4969 2.33855 12.7344C2.58887 12.3562 2.83233 11.9312 3.02093 11.4781L3.38441 10.6L2.67802 9.91875C2.05737 9.31563 1.31326 8.31875 1.31326 7C1.31326 4.24375 4.51257 2 8.44569 2C12.3788 2 15.5781 4.24375 15.5781 7C15.5781 9.75625 12.3788 12 8.44569 12Z"
fill="#005AFF" />
</svg>
<?php echo get_comments_number();?> Comments
<?php echo get_comments_number(); ?> Comments
</div>
</div>
</div>
</div>
</a>
</a>
</div>
</div>
</div>
<?php endwhile;?>
<?php endwhile; ?>
</div>
<?php the_posts_pagination();?>
<?php the_posts_pagination(); ?>
<!-- <nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
......@@ -111,6 +117,6 @@ $currentObject = get_queried_object();
</div>
</div>
</section>
<!-- // <?php echo custom_page_content(get_the_content(null,false,$current_page_id));?> -->
<!-- // <?php echo custom_page_content(get_the_content(null, false, $current_page_id)); ?> -->
<?php get_footer() ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment