Submit
Path:
~
/
home
/
getwphos
/
public_html
/
giulianos
/
wp-content
/
plugins
/
pixelwars-core
/
themes
/
global
/
File Content:
related-posts.php
<?php function pixelwars_core_related_posts_html__style_classic($query) { if ($query->have_posts()) : ?> <div class="related-posts"> <h3 class="widget-title"> <span><?php esc_html_e('You May Also Like', 'pixelwars-core'); ?></span> </h3> <!-- .widget-title --> <div class="blocks"> <?php while ($query->have_posts()) : $query->the_post(); ?> <div class="block"> <div class="related-post post-classic"> <?php if (has_post_thumbnail()) { ?> <div class="featured-image"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('pixelwars_core_image_size_3'); ?> </a> </div> <!-- .featured-image --> <?php } ?> <header class="entry-header"> <div class="entry-meta"> <span class="posted-on"> <span class="prefix"><?php esc_html_e('on', 'pixelwars-core'); ?></span> <!-- .prefix --> <a href="<?php the_permalink(); ?>" rel="bookmark"> <time class="entry-date published" datetime="<?php echo get_the_date('c'); ?>"><?php echo get_the_date(); ?></time> <!-- .entry-date .published --> </a> </span> <!-- .posted-on --> </div> <!-- .entry-meta --> <h2 class="entry-title"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h2> <!-- .entry-title --> </header> <!-- .entry-header --> </div> <!-- .related-post .post-classic --> </div> <!-- .block --> <?php endwhile; ?> </div> <!-- .blocks --> </div> <!-- .related-posts --> <?php endif; wp_reset_postdata(); } /* ============================================================================================================================================= */ function pixelwars_core_related_posts_html__style_overlay($query) { if ($query->have_posts()) : ?> <div class="related-posts"> <h3 class="widget-title"> <span><?php esc_html_e('You May Also Like', 'pixelwars-core'); ?></span> </h3> <!-- .widget-title --> <div class="blocks"> <?php while ($query->have_posts()) : $query->the_post(); ?> <div class="block"> <?php $featured_image_url = wp_get_attachment_image_url(get_post_thumbnail_id(), 'pixelwars_core_image_size_3'); ?> <div class="post-thumbnail" style="background-image: url(<?php echo esc_url($featured_image_url); ?>);"> <div class="post-wrap"> <header class="entry-header"> <div class="entry-meta"> <span class="cat-links"><?php the_category(' '); ?></span> <!-- .cat-links --> </div> <!-- .entry-meta --> <h2 class="entry-title"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h2> <!-- .entry-title --> <a class="more-link" href="<?php the_permalink(); ?>"><?php esc_html_e('View Post', 'pixelwars-core'); ?></a> <!-- .more-link --> </header> <!-- .entry-header --> </div> <!-- .post-wrap --> </div> <!-- .post-thumbnail --> </div> <!-- .block --> <?php endwhile; ?> </div> <!-- .blocks --> </div> <!-- .related-posts --> <?php endif; wp_reset_postdata(); } /* ============================================================================================================================================= */ /* ============================================================================================================================================= */ function pixelwars_core_related_posts($related_posts_category, $orderby, $posts_per_page, $related_posts_style) { $current_post_id = get_the_ID(); $current_post_categories = ""; // Empty string for all categories of blog. if ($related_posts_category == 'same') { $current_post_categories = wp_get_post_categories($current_post_id, array('fields' => 'ids')); // Get current post categories. (categories ids only) } $current_post_tags = wp_get_post_tags($current_post_id, array('fields' => 'ids')); // Get current post tags. (tags ids only) $exclude_ids = array($current_post_id); // Exclude only the current post. if (! empty($posts_per_page)) { $posts_per_page = intval($posts_per_page); } else { $posts_per_page = 3; } $query = new WP_Query( array( 'post_type' => 'post', 'ignore_sticky_posts' => true, 'category__in' => $current_post_categories, 'tag__in' => $current_post_tags, 'post__not_in' => $exclude_ids, 'orderby' => $orderby, 'posts_per_page' => $posts_per_page ) ); if ($related_posts_style == 'classic') { pixelwars_core_related_posts_html__style_classic($query); } else { pixelwars_core_related_posts_html__style_overlay($query); } } ?>
Submit
FILE
FOLDER
Name
Size
Permission
Action
css
---
0755
img
---
0755
js
---
0755
shortcode-generator
---
0755
dashboard-admin-notice.php
1067 bytes
0644
dashboard-welcome-panel.php
4841 bytes
0644
dashboard-widget.php
2449 bytes
0644
enqueue-styles-scripts.php
1853 bytes
0644
fonts.php
67526 bytes
0644
image-sizes.php
493 bytes
0644
image_max_dimensions.php
814 bytes
0644
index.php
29 bytes
0644
meta-box-featured-media.php
5757 bytes
0644
meta-box-page-settings.php
32173 bytes
0644
meta-box-post-header-style.php
117 bytes
0644
post-type-portfolio-2.php
2685 bytes
0644
post-type-portfolio.php
2809 bytes
0644
posts-columns.php
1188 bytes
0644
pre-get-posts.php
614 bytes
0644
related-posts.php
5234 bytes
0644
send-mail.php
2324 bytes
0644
share-links-2.php
4977 bytes
0644
share-links.php
4969 bytes
0644
widget-about-me.php
6338 bytes
0644
widget-animated-search.php
2742 bytes
0644
widget-button.php
9236 bytes
0644
widget-icon-box.php
10279 bytes
0644
widget-intro.php
12915 bytes
0644
widget-link-box.php
9289 bytes
0644
widget-main-slider.php
41872 bytes
0644
widget-social-media-icon.php
12302 bytes
0644
N4ST4R_ID | Naxtarrr