This repository has been archived on 2019-06-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
io-theme-2019/index.php
2019-06-09 16:44:48 +02:00

73 lines
1.5 KiB
PHP
Executable File

<?php get_header(); ?>
<main role="main">
<!-- section -->
<section>
<?php
$sticky = get_option('sticky_posts');
if (!empty($sticky)) :
// rsort($sticky);
// if (have_posts()):
$args = array(
'post__in' => $sticky,
'orderby' => 'rand',
'nopaging' => true,
'posts_per_page' => '1'
);
query_posts($args);
// while (have_posts()) :
the_post();
?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post thumbnail -->
<?php if (has_post_thumbnail()) : ?>
<div class="thumbnail-wrapper">
<?php the_post_thumbnail('home-thumb'); ?>
</div>
<?php endif; ?>
<!-- /post thumbnail -->
<!-- post title -->
<h2>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<!-- /post title -->
<span class="take-a-look">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
take a look</a>
</span>
</article>
<!-- /article -->
<?php //endwhile; ?>
<?php else : ?>
<!-- article -->
<article>
<h2>
<?php _e('Sorry, nothing to display.', 'iotheme'); ?>
</h2>
</article>
<!-- /article -->
<?php endif; ?>
</section>
<!-- /section -->
</main>
<?php get_footer(); ?>