File manager - Edit - /home/vblioqus/y999-game.pro/wp-content/themes/infopediya/index.php
Back
<?php /** * The main template file. * * @package APK_Store_Pro */ get_header(); ?> <main id="primary" class="site-main main-content"> <div class="container"> <section class="hero-section"> <h1><?php esc_html_e( 'Discover Amazing Apps', 'apk-store-pro' ); ?></h1> <p><?php esc_html_e( 'Download the latest and greatest APK files for your Android device', 'apk-store-pro' ); ?></p> </section> <!-- Latest Apps Section --> <section class="latest-apps-section"> <h2><?php esc_html_e( 'Latest Apps', 'apk-store-pro' ); ?></h2> <div class="apps-grid"> <?php $games_category = get_term_by('slug', 'games', 'app_category'); $exclude_categories = $games_category ? array($games_category->term_id) : array(); $args = array( 'post_type' => 'app', 'posts_per_page' => 8, 'orderby' => 'date', 'order' => 'DESC', 'tax_query' => array( array( 'taxonomy' => 'app_category', 'field' => 'term_id', 'terms' => $exclude_categories, 'operator' => 'NOT IN', ), ), ); $latest_apps_query = new WP_Query( $args ); if ( $latest_apps_query->have_posts() ) : while ( $latest_apps_query->have_posts() ) : $latest_apps_query->the_post(); $custom_icon = get_post_meta( get_the_ID(), 'app_icon', true ); $version = get_post_meta( get_the_ID(), 'app_version', true ); $size = get_post_meta( get_the_ID(), 'app_size', true ); $categories = get_the_terms( get_the_ID(), 'app_category' ); $category = $categories && !is_wp_error($categories) ? $categories[0]->name : ''; ?> <a href="<?php the_permalink(); ?>" class="app-card"> <div class="app-icon-container"> <?php if ( has_post_thumbnail() ) : ?> <img src="<?php echo esc_url(get_the_post_thumbnail_url(get_the_ID(), 'medium')); ?>" alt="<?php the_title_attribute(); ?>" class="app-icon-img" /> <?php elseif ( $custom_icon && filter_var($custom_icon, FILTER_VALIDATE_URL) ) : ?> <img src="<?php echo esc_url($custom_icon); ?>" alt="<?php the_title_attribute(); ?>" class="app-icon-img" /> <?php else : ?> <span class="icon-placeholder"><?php echo esc_html($custom_icon ?: '📱'); ?></span> <?php endif; ?> </div> <div class="app-info"> <h3 class="app-title"><?php the_title(); ?></h3> <div class="app-meta"> <?php if ( $version ) : ?> <span class="app-version"><?php echo esc_html( $version ); ?></span> <span class="meta-separator">|</span> <?php endif; ?> <?php if ( $size ) : ?> <span class="app-size"><?php echo esc_html( $size ); ?></span> <?php endif; ?> </div> <?php if ( $category ) : ?> <div class="app-category"><?php echo esc_html( $category ); ?></div> <?php endif; ?> </div> </a> <?php endwhile; wp_reset_postdata(); else : echo '<p>' . esc_html__( 'No apps found.', 'apk-store-pro' ) . '</p>'; endif; ?> </div> </section> <!-- Latest Games Section --> <section class="latest-games-section"> <h2><?php esc_html_e( 'Latest Games', 'apk-store-pro' ); ?></h2> <div class="apps-grid"> <?php $args = array( 'post_type' => 'app', 'posts_per_page' => 8, 'orderby' => 'date', 'order' => 'DESC', 'tax_query' => array( array( 'taxonomy' => 'app_category', 'field' => 'slug', 'terms' => 'games', ), ), ); $latest_games_query = new WP_Query( $args ); if ( $latest_games_query->have_posts() ) : while ( $latest_games_query->have_posts() ) : $latest_games_query->the_post(); $custom_icon = get_post_meta( get_the_ID(), 'app_icon', true ); $version = get_post_meta( get_the_ID(), 'app_version', true ); $size = get_post_meta( get_the_ID(), 'app_size', true ); $categories = get_the_terms( get_the_ID(), 'app_category' ); $category = $categories && !is_wp_error($categories) ? $categories[0]->name : ''; ?> <a href="<?php the_permalink(); ?>" class="app-card"> <div class="app-icon-container"> <?php if ( has_post_thumbnail() ) : ?> <img src="<?php echo esc_url(get_the_post_thumbnail_url(get_the_ID(), 'medium')); ?>" alt="<?php the_title_attribute(); ?>" class="app-icon-img" /> <?php elseif ( $custom_icon && filter_var($custom_icon, FILTER_VALIDATE_URL) ) : ?> <img src="<?php echo esc_url($custom_icon); ?>" alt="<?php the_title_attribute(); ?>" class="app-icon-img" /> <?php else : ?> <span class="icon-placeholder">🎮</span> <?php endif; ?> </div> <div class="app-info"> <h3 class="app-title"><?php the_title(); ?></h3> <div class="app-meta"> <?php if ( $version ) : ?> <span class="app-version"><?php echo esc_html( $version ); ?></span> <span class="meta-separator">|</span> <?php endif; ?> <?php if ( $size ) : ?> <span class="app-size"><?php echo esc_html( $size ); ?></span> <?php endif; ?> </div> <?php if ( $category ) : ?> <div class="app-category"><?php echo esc_html( $category ); ?></div> <?php endif; ?> </div> </a> <?php endwhile; wp_reset_postdata(); else : echo '<p>' . esc_html__( 'No games found.', 'apk-store-pro' ) . '</p>'; endif; ?> </div> </section> </div> </main> <?php get_footer(); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings