first draft complete
This commit is contained in:
parent
d791c70364
commit
f52737e7cf
47
404.php
47
404.php
@ -0,0 +1,47 @@
|
|||||||
|
<?php get_header() ?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="column two-thirds">
|
||||||
|
<h1>Oops, this page doesn't exist.</h1>
|
||||||
|
<p>Check out some of our articles below.</p>
|
||||||
|
<?php
|
||||||
|
$post_section_two_args = array(
|
||||||
|
'showposts' => 10,
|
||||||
|
'offset' => 0,
|
||||||
|
'orderby' => 'post_date',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'post_type' => 'post',
|
||||||
|
'post_status' => 'publish'
|
||||||
|
);
|
||||||
|
query_posts($post_section_two_args);
|
||||||
|
?>
|
||||||
|
<div style="text-align: center;" class="four-o-four-post-grid">
|
||||||
|
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||||
|
<?php
|
||||||
|
$category = get_the_category()[0];
|
||||||
|
?>
|
||||||
|
<div class="four-o-four-post-grid-card">
|
||||||
|
<a href="<?php the_permalink(); ?>">
|
||||||
|
<img src="<?php the_post_thumbnail_url(); ?>">
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo home_url($category->slug) ?>">
|
||||||
|
<p><?php echo $category->name; ?></p>
|
||||||
|
</a>
|
||||||
|
<a style="text-decoration: none; color: black;" href="<?php the_permalink(); ?>">
|
||||||
|
<h6><?php the_title(); ?></h6>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endwhile;
|
||||||
|
wp_reset_postdata();
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="column one-third">
|
||||||
|
<img class="article-sidebar-ad" src="/wp-content/themes/slowtwitch-wp/assets/images/vertical-ad-mock.jpg" alt="">
|
||||||
|
<?php dynamic_sidebar('slowtwitch-front-page'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php get_footer() ?>
|
46
archive.php
46
archive.php
@ -0,0 +1,46 @@
|
|||||||
|
<?php get_header() ?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="column two-thirds">
|
||||||
|
<?php
|
||||||
|
custom_breadcrumbs();
|
||||||
|
$post_count = 1;
|
||||||
|
$total_posts = $wp_query->post_count;
|
||||||
|
if (have_posts()) {
|
||||||
|
while (have_posts()) {
|
||||||
|
the_post();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="archive-article-card">
|
||||||
|
<a style="display: contents;" href="<?php the_permalink( ) ?>">
|
||||||
|
<?php the_post_thumbnail('thumbnail'); ?>
|
||||||
|
<div class="archive-article-text-block">
|
||||||
|
<h4 class="archive-article-title"> <?php the_title(); ?> </h4>
|
||||||
|
<div class="archive-article-author-box">
|
||||||
|
<?php the_author() ?>
|
||||||
|
<?php the_date() ?>
|
||||||
|
</div>
|
||||||
|
<?php the_excerpt() ?>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if($post_count < $total_posts) {
|
||||||
|
?> <hr class="slowtwitch-divider"> <?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
$post_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
the_posts_pagination();
|
||||||
|
wp_reset_postdata();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="column one-third archive-category-list">
|
||||||
|
<img class="article-sidebar-ad" src="/wp-content/themes/slowtwitch-wp/assets/images/vertical-ad-mock.jpg" alt="">
|
||||||
|
<?php dynamic_sidebar('slowtwitch-front-page'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer() ?>
|
@ -51,7 +51,7 @@
|
|||||||
<a style="display: contents;" class="slowtwitch-logo-social" href="https://www.youtube.com/slowtwitch">
|
<a style="display: contents;" class="slowtwitch-logo-social" href="https://www.youtube.com/slowtwitch">
|
||||||
<img class="slowtwitch-logo-social" src="/wp-content/themes/slowtwitch-wp/assets/images/youtube.svg" alt="youtube logo">
|
<img class="slowtwitch-logo-social" src="/wp-content/themes/slowtwitch-wp/assets/images/youtube.svg" alt="youtube logo">
|
||||||
</a>
|
</a>
|
||||||
<form method="get" action="">
|
<form method="get" action="/">
|
||||||
<div class="searchBarContainer">
|
<div class="searchBarContainer">
|
||||||
<input type="text" class="searchBox" name="s" id="s" placeholder="Search" />
|
<input type="text" class="searchBox" name="s" id="s" placeholder="Search" />
|
||||||
<button class="btn-search">
|
<button class="btn-search">
|
||||||
|
25
page.php
25
page.php
@ -0,0 +1,25 @@
|
|||||||
|
<?php get_header() ?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<?php
|
||||||
|
if (have_posts()) {
|
||||||
|
while (have_posts()) {
|
||||||
|
the_post();
|
||||||
|
$post_id = get_the_ID();
|
||||||
|
?>
|
||||||
|
<div class="column two-thirds">
|
||||||
|
<h1 class="article-title"> <?php the_title(); ?> </h1>
|
||||||
|
<?php
|
||||||
|
the_content();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wp_reset_postdata();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="column one-third">
|
||||||
|
<img class="article-sidebar-ad" src="/wp-content/themes/slowtwitch-wp/assets/images/vertical-ad-mock.jpg" alt="">
|
||||||
|
<?php dynamic_sidebar('slowtwitch-front-page'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer() ?>
|
45
search.php
45
search.php
@ -0,0 +1,45 @@
|
|||||||
|
<?php get_header() ?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="column two-thirds search-results-container">
|
||||||
|
<?php
|
||||||
|
$post_count = 1;
|
||||||
|
$total_posts = $wp_query->post_count;
|
||||||
|
if (have_posts()) {
|
||||||
|
while (have_posts()) {
|
||||||
|
the_post();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="archive-article-card">
|
||||||
|
<a style="display: contents;" href="<?php the_permalink( ) ?>">
|
||||||
|
<?php the_post_thumbnail('thumbnail'); ?>
|
||||||
|
<div class="archive-article-text-block">
|
||||||
|
<h4 class="archive-article-title"> <?php the_title(); ?> </h4>
|
||||||
|
<div class="archive-article-author-box">
|
||||||
|
<?php the_author() ?>
|
||||||
|
<?php the_date() ?>
|
||||||
|
</div>
|
||||||
|
<?php the_excerpt() ?>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if($post_count < $total_posts) {
|
||||||
|
?> <hr class="slowtwitch-divider"> <?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
$post_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
the_posts_pagination();
|
||||||
|
wp_reset_postdata();
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="column one-third archive-category-list">
|
||||||
|
<img class="article-sidebar-ad" src="/wp-content/themes/slowtwitch-wp/assets/images/vertical-ad-mock.jpg" alt="">
|
||||||
|
<?php dynamic_sidebar('slowtwitch-front-page'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer() ?>
|
44
style.css
44
style.css
@ -462,6 +462,7 @@ nav {
|
|||||||
|
|
||||||
.article-title {
|
.article-title {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-responsive {
|
.img-responsive {
|
||||||
@ -508,10 +509,17 @@ nav {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 550px) {
|
||||||
|
.img-responsive{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* BREADCRUMBS */
|
/* BREADCRUMBS */
|
||||||
#breadcrumbs{
|
#breadcrumbs{
|
||||||
list-style:none;
|
list-style:none;
|
||||||
margin:30px 0;
|
margin-top:30px;
|
||||||
|
margin-bottom: 0;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -525,4 +533,38 @@ nav {
|
|||||||
font-size:18px;
|
font-size:18px;
|
||||||
font-weight:100;
|
font-weight:100;
|
||||||
color:#ccc;
|
color:#ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* archives */
|
||||||
|
|
||||||
|
.archive-article-card {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.archive-article-card img {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.archive-article-text-block {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination .nav-links {
|
||||||
|
background-color: #fff;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-results-container {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.four-o-four-post-grid {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user