Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
wordpress-theme complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick authored Jun 3, 2017
1 parent 63e5107 commit dff465d
Show file tree
Hide file tree
Showing 23 changed files with 1,572 additions and 0 deletions.
38 changes: 38 additions & 0 deletions about-layout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

get_header(); ?>

<!-- site-content -->
<div class="site-content clearfix">

<?php get_sidebar(); ?>
<!-- main-column -->
<div class="main-column">

<?php

if (have_posts()) :

?>

<?php
while (have_posts()) : the_post();

get_template_part('categorythumbs');

endwhile;

else :
echo '<p>No content found</p>';

endif;

?>

</div><!-- /main-column -->

</div><!-- /site-content -->

<?php get_footer();

?>
38 changes: 38 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

get_header(); ?>

<!-- site-content -->
<div class="site-content clearfix" title="work">

<?php get_sidebar(); ?>
<!-- main-column -->
<div class="main-column">

<?php

if (have_posts()) :

?>

<?php
while (have_posts()) : the_post();

get_template_part('categorythumbs');

endwhile;

else :
echo '<p>No content found</p>';

endif;

?>

</div><!-- /main-column -->

</div><!-- /site-content -->

<?php get_footer();

?>
5 changes: 5 additions & 0 deletions categorythumbs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- post-thumbnail -->
<div class="post-thumbnail homepage-thumb">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('square-thumbnail'); ?></a>
</div>
<!-- /post-thumbnail -->
7 changes: 7 additions & 0 deletions content-about.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<article class="page">

<h2><?php the_title(); ?></h2>

<?php the_content(); ?>

</article>
6 changes: 6 additions & 0 deletions content-aside.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<article class="post post-aside">

<p class="mini-meta"><a href="<?php the_permalink(); ?>"><?php the_author(); ?> @ <?php the_time('F j, Y'); ?></a></p>
<?php the_content(); ?>

</article>
6 changes: 6 additions & 0 deletions content-gallery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<article class="post post-gallery">

<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>

</article>
6 changes: 6 additions & 0 deletions content-link.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<article class="post post-link">
<a href="<?php echo get_the_content(); ?>">
<span class="mini-meta"><?php the_author(); ?> @ <?php the_time('F j, Y'); ?></span>
<span class="post-link-text"><?php the_title(); ?></span>
</a>
</article>
13 changes: 13 additions & 0 deletions content-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<article class="page">

<h2><?php the_title(); ?></h2>

<p class="page-intro"><?php echo intro_get_meta( 'intro_intro' ); ?></p>

<?php the_content(); ?>

<div class="banner-image-full">
<?php the_post_thumbnail('banner-image'); ?>
</div>

</article>
9 changes: 9 additions & 0 deletions content-single.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<article class="post">
<h2><?php the_title(); ?></h2>

<p class="page-intro"><?php echo intro_get_meta( 'intro_intro' ); ?></p>

<?php the_content(); ?>

<?php the_post_thumbnail('banner-image'); ?>
</article>
57 changes: 57 additions & 0 deletions content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<article class="post <?php if ( has_post_thumbnail() ) { ?>has-thumbnail <?php } ?>">

<!-- post-thumbnail -->
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('small-thumbnail'); ?></a>
</div><!-- /post-thumbnail -->



<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

<p class="post-info"><?php the_time('F j, Y g:i a'); ?> | by <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author(); ?></a> | Posted in

<?php

$categories = get_the_category();
$separator = ", ";
$output = '';

if ($categories) {

foreach ($categories as $category) {

$output .= '<a href="' . get_category_link($category->term_id) . '">' . $category->cat_name . '</a>' . $separator;

}

echo trim($output, $separator);

}

?>

</p>


<?php if ( is_search() OR is_archive() ) { ?>
<p>
<?php echo get_the_excerpt(); ?>
<a href="<?php the_permalink(); ?>">Read more&raquo;</a>
</p>
<?php } else {
if ($post->post_excerpt) { ?>

<p>
<?php echo get_the_excerpt(); ?>
<a href="<?php the_permalink(); ?>">Read more&raquo;</a>
</p>

<?php } else {

the_content();

}
} ?>

</article>
17 changes: 17 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<footer class="site-footer">
<nav class="site-nav">
<?php

$args = array(
'theme_location' => 'footer'
);

?>

<?php wp_nav_menu( $args ); ?>
</nav>
<i id="totop" class="fa fa-angle-up" aria-hidden="true"></i>
</footer>
</div><!-- container -->
</body>
</html>
43 changes: 43 additions & 0 deletions front-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

get_header(); ?>

<!-- site-content -->
<div class="site-content clearfix" title="homepage">
<?php get_sidebar(); ?>
<div class="main-column">
<?php if (have_posts()) :
while (have_posts()) : the_post();

get_template_part( 'categorythumbs');

endwhile;

else :
echo '<p>No content found</p>';

endif; ?>

<?php
$mypages = get_pages( array(
'exclude' => '9', 'sort_column' => 'post_date', 'sort_order' => 'desc'
) );
foreach( $mypages as $page ) {
$content = $page->post_content;
if ( ! $content )
continue;
$content = apply_filters( 'the_content', $content );?>
<!-- post-thumbnail -->
<div class="post-thumbnail homepage-thumb">
<a href="<?php echo get_page_link( $page->ID ); ?>">
<?php echo get_the_post_thumbnail( $page->ID , 'square-thumbnail');?></a>
</div>
<!-- /post-thumbnail -->
<?php } ?>

</div>
</div><!-- /site-content -->

<?php get_footer();

?>
Loading

0 comments on commit dff465d

Please sign in to comment.