Compare commits
No commits in common. "d009ca412da4b248eb45311ebcca7c86cf5daf01" and "0c2d1a387fdc41a0ba7bb9a29e0cd6b35eb4f728" have entirely different histories.
d009ca412d
...
0c2d1a387f
|
@ -1,4 +1,5 @@
|
||||||
_*
|
_off/
|
||||||
|
_codenotes.txt
|
||||||
originalPHPfiles/
|
originalPHPfiles/
|
||||||
FoundationPress/
|
FoundationPress/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
64
archive.php
64
archive.php
|
@ -17,43 +17,23 @@
|
||||||
|
|
||||||
get_header(); ?>
|
get_header(); ?>
|
||||||
|
|
||||||
|
<div class="main-container">
|
||||||
|
<div class="main-grid">
|
||||||
|
<main class="main-content">
|
||||||
|
<?php if ( have_posts() ) : ?>
|
||||||
|
|
||||||
|
<?php /* Start the Loop */ ?>
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php else : ?>
|
||||||
|
<?php get_template_part( 'template-parts/content', 'none' ); ?>
|
||||||
|
|
||||||
|
<?php endif; // End have_posts() check. ?>
|
||||||
|
|
||||||
|
<?php /* Display navigation to next/previous pages when applicable */ ?>
|
||||||
<?php
|
<?php
|
||||||
if ( is_post_type_archive ( 'archive_resource' ) ) :
|
|
||||||
get_template_part( 'template-parts/announcement', 'resources' );
|
|
||||||
else:
|
|
||||||
get_template_part( 'template-parts/announcement', '' );
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<main>
|
|
||||||
<?php
|
|
||||||
// https://codex.wordpress.org/Conditional_Tags
|
|
||||||
if ( is_post_type_archive ( 'archive_resource' ) ) :
|
|
||||||
|
|
||||||
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
|
|
||||||
get_template_part( 'template-parts/section', 'resources', array( 'custom_post_type' => 'archive_resource', 'post_per_page' => '10' ) );
|
|
||||||
|
|
||||||
elseif ( is_category( 'resources' ) ):
|
|
||||||
get_template_part( 'template-parts/section', 'categoryposts', array( 'category_name' => 'resources', 'post_per_page' => '10' ) );
|
|
||||||
elseif ( is_category( '' ) ):
|
|
||||||
get_template_part( 'template-parts/section', 'categoryposts', array('post_per_page' => '6' ) );
|
|
||||||
|
|
||||||
else :
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php if ( have_posts() ) :
|
|
||||||
// Start the Loop
|
|
||||||
while ( have_posts() ) : the_post();
|
|
||||||
get_template_part( 'template-parts/content', get_post_format() );
|
|
||||||
endwhile;
|
|
||||||
else :
|
|
||||||
get_template_part( 'template-parts/content', 'none' );
|
|
||||||
endif; // End have_posts() check.
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Display navigation to next/previous pages when applicable
|
|
||||||
if ( function_exists( 'foundationpress_pagination' ) ) :
|
if ( function_exists( 'foundationpress_pagination' ) ) :
|
||||||
foundationpress_pagination();
|
foundationpress_pagination();
|
||||||
elseif ( is_paged() ) :
|
elseif ( is_paged() ) :
|
||||||
|
@ -64,17 +44,11 @@ endif;
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
endif;//end if is archive_resource
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
</article>
|
<?php //get_sidebar(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?php get_footer();
|
<?php get_footer();
|
||||||
|
|
|
@ -19,7 +19,7 @@ get_header(); ?>
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<main>
|
<main>
|
||||||
<?php// get_template_part( 'template-parts/section', 'categoryposts' ); ?>
|
<?php// get_template_part( 'template-parts/section', 'news' ); ?>
|
||||||
<section class="category-posts">
|
<section class="category-posts">
|
||||||
<header>
|
<header>
|
||||||
<h2><?php single_term_title( );?></h2>
|
<h2><?php single_term_title( );?></h2>
|
|
@ -12,7 +12,7 @@ if ( ! function_exists( 'foundationpress_sidebar_widgets' ) ) :
|
||||||
array(
|
array(
|
||||||
'id' => 'home-announcement-widgets',
|
'id' => 'home-announcement-widgets',
|
||||||
'name' => __( 'Home Announcement widgets', 'foundationpress' ),
|
'name' => __( 'Home Announcement widgets', 'foundationpress' ),
|
||||||
'description' => __( 'Drag widgets to this Home page container that will show at the top of the home page.', 'foundationpress' ),
|
'description' => __( 'Drag widgets to this Home page container that will show at the top.', 'foundationpress' ),
|
||||||
'before_sidebar'=> '<main class="slides">',
|
'before_sidebar'=> '<main class="slides">',
|
||||||
'after_sidebar' => '</main>',
|
'after_sidebar' => '</main>',
|
||||||
'before_widget' => '<section id="%1$s" class="widget slide home-announcement %2$s">',
|
'before_widget' => '<section id="%1$s" class="widget slide home-announcement %2$s">',
|
||||||
|
@ -25,7 +25,7 @@ if ( ! function_exists( 'foundationpress_sidebar_widgets' ) ) :
|
||||||
array(
|
array(
|
||||||
'id' => 'home-announcement-middle-widgets',
|
'id' => 'home-announcement-middle-widgets',
|
||||||
'name' => __( 'Home Announcement Middle widgets', 'foundationpress' ),
|
'name' => __( 'Home Announcement Middle widgets', 'foundationpress' ),
|
||||||
'description' => __( 'Drag widgets to this Home page container that will show in the middle of the home page.', 'foundationpress' ),
|
'description' => __( 'Drag widgets to this Home page container that will show in the middle.', 'foundationpress' ),
|
||||||
'before_sidebar'=> '<main class="slides">',
|
'before_sidebar'=> '<main class="slides">',
|
||||||
'after_sidebar' => '</main>',
|
'after_sidebar' => '</main>',
|
||||||
'before_widget' => '<section id="%1$s" class="widget slide home-middle-announcement %2$s">',
|
'before_widget' => '<section id="%1$s" class="widget slide home-middle-announcement %2$s">',
|
||||||
|
@ -38,7 +38,7 @@ if ( ! function_exists( 'foundationpress_sidebar_widgets' ) ) :
|
||||||
array(
|
array(
|
||||||
'id' => 'home-announcement-bottom-widgets',
|
'id' => 'home-announcement-bottom-widgets',
|
||||||
'name' => __( 'Home Announcement Bottom widgets', 'foundationpress' ),
|
'name' => __( 'Home Announcement Bottom widgets', 'foundationpress' ),
|
||||||
'description' => __( 'Drag widgets to this Home page container that will show at the bottom of the home page.', 'foundationpress' ),
|
'description' => __( 'Drag widgets to this Home page container that will show at the bottom.', 'foundationpress' ),
|
||||||
'before_sidebar'=> '<main class="slides">',
|
'before_sidebar'=> '<main class="slides">',
|
||||||
'after_sidebar' => '</main>',
|
'after_sidebar' => '</main>',
|
||||||
'before_widget' => '<section id="%1$s" class="widget slide home-bottom-announcement %2$s">',
|
'before_widget' => '<section id="%1$s" class="widget slide home-bottom-announcement %2$s">',
|
||||||
|
@ -58,17 +58,6 @@ if ( ! function_exists( 'foundationpress_sidebar_widgets' ) ) :
|
||||||
'after_title' => '</h6>',
|
'after_title' => '</h6>',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
register_sidebar(
|
|
||||||
array(
|
|
||||||
'id' => 'announcement-resources-widgets',
|
|
||||||
'name' => __( 'Announcement Resources widgets', 'foundationpress' ),
|
|
||||||
'description' => __( 'Drag widgets to this announcement container to be displayed in Resources.', 'foundationpress' ),
|
|
||||||
'before_widget' => '<section id="%1$s" class="widget slide %2$s">',
|
|
||||||
'after_widget' => '</section>',
|
|
||||||
'before_title' => '<h6>',
|
|
||||||
'after_title' => '</h6>',
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
register_sidebar(
|
register_sidebar(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* The breaking div containing the main widget area
|
|
||||||
*
|
|
||||||
* @package arcHIVE-theme
|
|
||||||
* @since arcHIVE-theme 1.0.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
?>
|
|
||||||
<section class="hero hero-announcement resources">
|
|
||||||
<?php dynamic_sidebar( 'announcement-resources-widgets' ); ?>
|
|
||||||
<aside>
|
|
||||||
<?php //insert menu here; ?>
|
|
||||||
<?php //foundationpress_announcement_bar(); ?>
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
|
@ -1,72 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* The section containing preview of resources
|
|
||||||
*
|
|
||||||
* @package arcHIVE-theme
|
|
||||||
* @since arcHIVE-theme 1.0.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//https://developer.wordpress.org/reference/functions/get_template_part/#comment-4130
|
|
||||||
// var_dump( $args ); //will display everythin imported from
|
|
||||||
// get_template_part( 'template-parts/section', 'category', array('category_name' => 'news', 'post_per_page' => '3' ) );
|
|
||||||
$thiscustomposttype = $args['custom_post_type'];
|
|
||||||
$howmanyposts = $args['post_per_page'];
|
|
||||||
?>
|
|
||||||
<section class="archive-resources">
|
|
||||||
<header>
|
|
||||||
<h2>
|
|
||||||
<?php
|
|
||||||
if ( is_post_type_archive($thiscustomposttype) ):
|
|
||||||
//post_type_archive_title();
|
|
||||||
else:
|
|
||||||
echo $thiscustomposttype;
|
|
||||||
endif;?>
|
|
||||||
</h2>
|
|
||||||
</header>
|
|
||||||
<main class="">
|
|
||||||
<?php $the_query = new WP_Query( array( 'post_type' => $thiscustomposttype, 'posts_per_page' => $howmanyposts ) ); ?>
|
|
||||||
<?php if ( $the_query->have_posts() ) : ?>
|
|
||||||
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
|
||||||
<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('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 ?>
|
|
||||||
<?php //pagination here ?>
|
|
||||||
<?php wp_reset_postdata(); ?>
|
|
||||||
<?php else : //if no post in query ?>
|
|
||||||
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
</main>
|
|
||||||
<aside>
|
|
||||||
<nav>
|
|
||||||
<!--a href="" class="button hollow">see more news</a-->
|
|
||||||
</nav>
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
Loading…
Reference in New Issue