File manager - Edit - /home/vblioqus/y999-game.pro/wp-content/themes/infopediya/single-apps.php
Back
<?php /** * Modern Single App Template * Matches the reference design with clean layout and proper styling */ // Force background color add_action('wp_head', function() { echo '<style>body,body.single-app,body.single{background:#f8f9fa!important;}</style>'; }, 1); // Load fonts add_action('wp_head', function() { echo '<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">'; }, 2); get_header(); ?> <div class="app-page-wrapper"> <div class="app-container"> <?php while (have_posts()) : the_post(); ?> <!-- App Header --> <div class="app-header"> <div class="app-icon"> <?php if (has_post_thumbnail()) : ?> <img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>"> <?php else : ?> <div class="app-icon-placeholder">📱</div> <?php endif; ?> </div> <div class="app-info"> <h1 class="app-title"><?php the_title(); ?></h1> <?php $developer = get_post_meta(get_the_ID(), 'app_developer', true); if ($developer) : ?> <a href="#" class="app-developer"><?php echo esc_html($developer); ?></a> <?php endif; ?> <?php $category = get_the_category(); if ($category) : ?> <span class="app-category"><?php echo esc_html($category[0]->name); ?></span> <?php endif; ?> <div class="app-stats"> <?php $rating = get_post_meta(get_the_ID(), 'app_rating', true); if ($rating) : ?> <div class="stat-item"> <div class="stat-number"><?php echo esc_html($rating); ?></div> <div class="stat-label">Rating</div> <div class="rating-stars">★★★★☆</div> </div> <?php endif; ?> <?php $downloads = get_post_meta(get_the_ID(), 'app_downloads', true); if ($downloads) : ?> <div class="stat-item"> <div class="stat-number"><?php echo esc_html($downloads); ?></div> <div class="stat-label">Downloads</div> </div> <?php endif; ?> <?php $size = get_post_meta(get_the_ID(), 'app_size', true); if ($size) : ?> <div class="stat-item"> <div class="stat-number"><?php echo esc_html($size); ?></div> <div class="stat-label">Size</div> </div> <?php endif; ?> </div> </div> </div> <!-- Short Description --> <?php $short_desc = get_post_meta(get_the_ID(), 'short_description', true); if ($short_desc) : ?> <div class="app-description"> <h3>About this app</h3> <p><?php echo esc_html($short_desc); ?></p> </div> <?php endif; ?> <!-- Download Section --> <div class="download-section"> <?php $download_url = get_post_meta(get_the_ID(), 'download_url', true); $app_price = get_post_meta(get_the_ID(), 'app_price', true); $price_text = $app_price ? $app_price : 'Free'; ?> <a href="<?php echo esc_url($download_url ? $download_url : '#'); ?>" class="download-btn"> <span class="download-icon">⬇</span> Download - <?php echo esc_html($price_text); ?> </a> </div> <!-- Screenshots --> <?php $screenshots = get_post_meta(get_the_ID(), 'app_screenshots', true); if ($screenshots) : ?> <div class="app-screenshots"> <h3>Screenshots</h3> <div class="screenshots-grid"> <?php $screenshot_urls = explode(',', $screenshots); foreach ($screenshot_urls as $screenshot_url) : $screenshot_url = trim($screenshot_url); if ($screenshot_url) : ?> <div class="screenshot"> <img src="<?php echo esc_url($screenshot_url); ?>" alt="Screenshot"> </div> <?php endif; endforeach; ?> </div> </div> <?php endif; ?> <!-- App Details --> <div class="app-details"> <h3>App Information</h3> <div class="details-grid"> <?php $details = [ 'Version' => get_post_meta(get_the_ID(), 'app_version', true), 'Size' => get_post_meta(get_the_ID(), 'app_size', true), 'Android Version' => get_post_meta(get_the_ID(), 'android_version', true), 'Downloads' => get_post_meta(get_the_ID(), 'app_downloads', true), 'Price' => get_post_meta(get_the_ID(), 'app_price', true), 'Last Updated' => get_post_meta(get_the_ID(), 'last_updated', true), 'Developer' => get_post_meta(get_the_ID(), 'app_developer', true), 'Content Rating' => get_post_meta(get_the_ID(), 'content_rating', true) ]; foreach ($details as $label => $value) : if ($value) : ?> <div class="detail-item"> <span class="detail-label"><?php echo esc_html($label); ?></span> <span class="detail-value"><?php echo esc_html($value); ?></span> </div> <?php endif; endforeach; ?> </div> </div> <!-- Main Content --> <?php if (get_the_content()) : ?> <div class="app-content"> <h3>Description</h3> <?php the_content(); ?> </div> <?php endif; ?> <?php endwhile; ?> </div> </div> <?php // Final CSS override add_action('wp_footer', function() { echo '<style>body{background:#f8f9fa!important;}</style>'; }, 9999); <div id="app-content" class="app-single-content" style="padding-top: 20px;"> <!-- Your existing app content --> </div> get_footer(); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings