Compare commits
No commits in common. "233a56b670b477aeb902de347f9597e95f7f2347" and "5c05c0f1e370010fc8935405b61a0f0fdec52296" have entirely different histories.
233a56b670
...
5c05c0f1e3
|
@ -29,8 +29,7 @@ endif;
|
||||||
<main>
|
<main>
|
||||||
<?php
|
<?php
|
||||||
// https://codex.wordpress.org/Conditional_Tags
|
// https://codex.wordpress.org/Conditional_Tags
|
||||||
// if ( is_post_type_archive ( 'archive_resource' ) ) :
|
if ( is_post_type_archive ( 'archive_resource' ) ) :
|
||||||
if ( is_post_type_archive ( 'archive_resource' ) || is_tax( 'archive_resource_category' ) || is_tax( 'archive_resource_tag' ) ) :
|
|
||||||
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
|
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
|
||||||
//get_template_part( 'template-parts/section', 'resources', array( 'post_per_page' => '10' ) );
|
//get_template_part( 'template-parts/section', 'resources', array( 'post_per_page' => '10' ) );
|
||||||
get_template_part( 'template-parts/archive', 'resources');
|
get_template_part( 'template-parts/archive', 'resources');
|
||||||
|
@ -52,6 +51,7 @@ endif;
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
<main class="">
|
<main class="">
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
@ -86,14 +86,12 @@ endif;
|
||||||
<?php //pagination here ?>
|
<?php //pagination here ?>
|
||||||
<aside>
|
<aside>
|
||||||
<nav>
|
<nav>
|
||||||
<div class="post-next"><?php next_posts_link( __( '← Older', 'foundationpress' ) ); ?></div>
|
<!--a href="" class="button hollow">see more news</a-->
|
||||||
<div class="post-previous"><?php previous_posts_link( __( 'Newer →', 'foundationpress' ) ); ?></div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
<?php else : //if no post in query ?>
|
<?php else : //if no post in query ?>
|
||||||
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
|
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -476,17 +476,17 @@ main {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.archive-posts.resources{
|
.hero-announcement {
|
||||||
header {
|
&.resources{
|
||||||
|
.slides {
|
||||||
}
|
&.announcement.middle {
|
||||||
.hero-announcement {
|
margin-top: 0;
|
||||||
.slides {
|
// .widget_nav_menu,.widget_tag_cloud {
|
||||||
&.announcement.middle {
|
// width: auto;
|
||||||
margin-top: 0;
|
// overflow: visible;
|
||||||
padding-top: $global-padding;
|
// }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//end hero
|
//end hero
|
||||||
|
|
|
@ -161,12 +161,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.breadcrumbs {
|
|
||||||
color: scale-color($anchor-color, $saturation: -50%, $lightness: 60%);
|
|
||||||
font-size: $global-font-size *1.2;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
}
|
|
||||||
@include breakpoint(small){
|
@include breakpoint(small){
|
||||||
}
|
}
|
||||||
@include breakpoint(medium){
|
@include breakpoint(medium){
|
||||||
|
|
|
@ -27,9 +27,8 @@ get_header(); ?>
|
||||||
<?php echo get_search_query( ); ?>
|
<?php echo get_search_query( ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<aside class="hero hero-announcement resources">
|
|
||||||
<?php dynamic_sidebar( 'announcement-resources-middle-widgets' ); ?>
|
|
||||||
</aside>
|
|
||||||
<main class="">
|
<main class="">
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
|
@ -476,17 +476,17 @@ main {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.archive-posts.resources{
|
.hero-announcement {
|
||||||
header {
|
&.resources{
|
||||||
|
.slides {
|
||||||
}
|
&.announcement.middle {
|
||||||
.hero-announcement {
|
margin-top: 0;
|
||||||
.slides {
|
// .widget_nav_menu,.widget_tag_cloud {
|
||||||
&.announcement.middle {
|
// width: auto;
|
||||||
margin-top: 0;
|
// overflow: visible;
|
||||||
padding-top: $global-padding;
|
// }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//end hero
|
//end hero
|
||||||
|
|
|
@ -161,12 +161,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.breadcrumbs {
|
|
||||||
color: scale-color($anchor-color, $saturation: -50%, $lightness: 60%);
|
|
||||||
font-size: $global-font-size *1.2;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
}
|
|
||||||
@include breakpoint(small){
|
@include breakpoint(small){
|
||||||
}
|
}
|
||||||
@include breakpoint(medium){
|
@include breakpoint(medium){
|
||||||
|
|
|
@ -21,61 +21,58 @@
|
||||||
|
|
||||||
<section class="archive-posts resources">
|
<section class="archive-posts resources">
|
||||||
<header>
|
<header>
|
||||||
<h2>Resources <?php //post_type_archive_title(); ?></h2>
|
<h2>
|
||||||
<h4 class="breadcrumbs">
|
<?php
|
||||||
<?php
|
if ( is_post_type_archive() ):
|
||||||
if ( is_tax( 'archive_resource_category' ) ):
|
post_type_archive_title();
|
||||||
single_cat_title( '<span class="h6"></span> ' );
|
endif;
|
||||||
elseif ( is_tax( 'archive_resource_tag' ) ):
|
?>
|
||||||
single_term_title( '<span class="h5">#</span>' );
|
</h2>
|
||||||
else:
|
|
||||||
echo ' ';
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
</h4>
|
|
||||||
</header>
|
</header>
|
||||||
<aside class="hero hero-announcement resources">
|
<aside class="hero hero-announcement resources">
|
||||||
<?php dynamic_sidebar( 'announcement-resources-middle-widgets' ); ?>
|
<?php dynamic_sidebar( 'announcement-resources-middle-widgets' ); ?>
|
||||||
</aside>
|
</aside>
|
||||||
<main class="">
|
<main class="">
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php $the_query = new WP_Query( array( 'post_type' => get_post_type( get_the_ID() ), 'posts_per_page' => '10' , 'paged' => $paged ) ); ?>
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php if ( $the_query->have_posts() ) : ?>
|
||||||
<article class="">
|
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||||
<?php if ( has_post_thumbnail() ) :?>
|
<article class="">
|
||||||
|
<?php if ( has_post_thumbnail() ) :?>
|
||||||
|
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
|
||||||
|
<figure style="background-image: url(<?php echo get_the_post_thumbnail_url();?>);">
|
||||||
|
</figure>
|
||||||
|
</a>
|
||||||
|
<?php else :?>
|
||||||
|
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
|
||||||
|
<figure style="background-image: url(<?php echo catch_post_first_image();?>);">
|
||||||
|
</figure>
|
||||||
|
</a>
|
||||||
|
<?php endif;?>
|
||||||
|
<h5 class="date">
|
||||||
|
<?php the_date('Y');?>
|
||||||
|
</h5>
|
||||||
|
<h3 class="entry-title">
|
||||||
|
<a href="<?php the_permalink(); ?>" rel="bookmark">
|
||||||
|
<?php the_title(); ?>
|
||||||
|
</a>
|
||||||
|
</h3>
|
||||||
|
<section class="excerpt post-excerpt">
|
||||||
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
|
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
|
||||||
<figure style="background-image: url(<?php echo get_the_post_thumbnail_url();?>);">
|
<?php the_excerpt() ?>
|
||||||
</figure>
|
</a>
|
||||||
</a>
|
</section>
|
||||||
<?php else :?>
|
</article>
|
||||||
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
|
<?php endwhile;//end of the loop ?>
|
||||||
<figure style="background-image: url(<?php echo catch_post_first_image();?>);">
|
|
||||||
</figure>
|
|
||||||
</a>
|
|
||||||
<?php endif;?>
|
|
||||||
<h5 class="date">
|
|
||||||
<?php //the_date('d.m.Y');?>
|
|
||||||
</h5>
|
|
||||||
<h3 class="entry-title">
|
|
||||||
<a href="<?php the_permalink(); ?>" rel="bookmark">
|
|
||||||
<?php the_title(); ?>
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
<section class="excerpt post-excerpt">
|
|
||||||
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
|
|
||||||
<?php the_excerpt() ?>
|
|
||||||
</a>
|
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
<?php endwhile;//end of the loop ?>
|
|
||||||
</main>
|
|
||||||
<?php //pagination here ?>
|
<?php //pagination here ?>
|
||||||
<aside>
|
<?php wp_reset_postdata(); ?>
|
||||||
<nav>
|
<?php else : //if no post in query ?>
|
||||||
<div class="post-next"><?php next_posts_link( __( '← Older', 'foundationpress' ) ); ?></div>
|
|
||||||
<div class="post-previous"><?php previous_posts_link( __( 'Newer →', 'foundationpress' ) ); ?></div>
|
|
||||||
</nav>
|
|
||||||
</aside>
|
|
||||||
<?php else : //if no post in query ?>
|
|
||||||
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
|
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</main>
|
||||||
|
<aside>
|
||||||
|
<nav>
|
||||||
|
<div class="post-next"><?php next_posts_link( __( '← Older', 'foundationpress' ) ); ?></div>
|
||||||
|
<div class="post-previous"><?php previous_posts_link( __( 'Newer →', 'foundationpress' ) ); ?></div>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue