| Server IP : 27.254.66.5 / Your IP : 216.73.217.14 Web Server : Apache/2 System : Linux cs82.hostneverdie.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 User : technic2 ( 1951) PHP Version : 7.4.30 Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,sleep,pcntl_exec,virtual,suexec,dbmopen,dl,symlink,disk_free_space,diskfreespace,leak MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/technic2/public_html/old-website/vectv/wp-content/themes/awaken/inc/functions/ |
Upload File : |
<?php
/**
* Custom slider and the featured posts for the theme.
*/
if ( !function_exists( 'awaken_featured_posts' ) ) :
function awaken_featured_posts() {
$category = get_theme_mod( 'slider_category', '' );
$slider_posts = new WP_Query( array(
'posts_per_page' => 5,
'cat' => $category
)
);
?>
<div class="awaken-featured-container">
<div class="awaken-featured-slider">
<section class="slider">
<div class="flexslider">
<ul class="slides">
<?php while( $slider_posts->have_posts() ) : $slider_posts->the_post(); ?>
<li>
<div class="awaken-slider-container">
<?php if ( has_post_thumbnail() ) { ?>
<?php the_post_thumbnail( 'featured-slider' ); ?>
<?php } else { ?>
<img src="<?php echo get_template_directory_uri() . '/images/slide.jpg' ?>">
<?php } ?>
<div class="awaken-slider-details-container">
<a href="<?php the_permalink(); ?>" rel="bookmark"><h1 class="awaken-slider-title"><?php the_title(); ?></h1></a>
</div>
</div>
</li>
<?php endwhile; ?>
</ul>
</div>
</section>
</div><!-- .awaken-slider -->
<div class="awaken-featured-posts">
<?php
$fposts_category = get_theme_mod( 'featured_posts_category', '' );
$fposts = new WP_Query( array(
'posts_per_page' => 2,
'cat' => $fposts_category,
'ignore_sticky_posts' => 1
));
while( $fposts->have_posts() ) : $fposts->the_post(); ?>
<div class="afp">
<figure class="afp-thumbnail">
<?php if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail( 'featured', array('title' => get_the_title()) ); ?></a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/featured.jpg" alt="<?php the_title(); ?>" /></a>
<?php } ?>
</figure>
<div class="afp-title">
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php
}
endif;