File manager - Edit - /home/vblioqus/bingo-patti.cc/wp-content/themes/infopediya/template-parts/similar-apps.php
Back
<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-2"> <img width="18" height="20" src="<?php echo get_template_directory_uri() . '/icons/file.svg' ?>" alt="google-svg-icon"> You may like this </span> </div> </div> </div> </div> <div class="block-body p-lg-3 row ml-0 mr-0 "> <?php $category = 'Blog'; $options = get_option('Theme_Options_Panel'); $category = $options['_infopediya_blog-category'] ?? ''; $article_type = get_post_meta(get_the_ID(), 'infopediya_meta_file_or_blog', true); if( $article_type == 'Blog article' ) { $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 4, 'category_name' => $category, ); } else { $post_categories = get_the_category(); if(!$post_categories) { $post_categories = get_categories(); } $file_categories = array_filter($post_categories, function($cat_name) { global $category; return strtolower($cat_name->name) != strtolower($category); }); $args = array( 'post_status' => 'publish', 'posts_per_page' => 6, 'category_name' => $file_categories[array_rand($file_categories)]->name, ); } // The Query $the_query = new WP_Query($args); // The Loop if ($the_query->have_posts()) { while ($the_query->have_posts()) : $the_query->the_post(); if( $article_type != 'Blog article' ) { get_template_part('template-parts/content', 'app-block'); }else { ?> <div class="col-lg-3 col-md-6 col-sm-12 mb-4 mt-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(); } else { // no posts found } ?> </div> </div>
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0.05 |
proxy
|
phpinfo
|
Settings