Resources presented as 5 columns. other post archives 3 column

This commit is contained in:
jorge 2022-03-30 21:14:48 +02:00
parent d009ca412d
commit a330d65f22
5 changed files with 62 additions and 63 deletions

View File

@ -32,7 +32,7 @@ endif;
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' ) );
get_template_part( 'template-parts/section', 'resources', array( 'post_per_page' => '10' ) );
elseif ( is_category( 'resources' ) ):
get_template_part( 'template-parts/section', 'categoryposts', array( 'category_name' => 'resources', 'post_per_page' => '10' ) );

File diff suppressed because one or more lines are too long

View File

@ -74,7 +74,7 @@
// category view and news
//--------------
.category-posts {
.category-posts,.archive-posts {
@include xy-grid;
header,main,aside {
@include breakpoint(small){
@ -129,7 +129,6 @@
line-height: 0.7;
font-size: $global-font-size*1.5;
}
}
}
aside {

View File

@ -74,7 +74,7 @@
// category view and news
//--------------
.category-posts {
.category-posts,.archive-posts {
@include xy-grid;
header,main,aside {
@include breakpoint(small){
@ -129,7 +129,6 @@
line-height: 0.7;
font-size: $global-font-size*1.5;
}
}
}
aside {

View File

@ -13,18 +13,19 @@
//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'];
$thiscustomposttype = get_post_type( get_the_ID() );
$howmanyposts = $args['post_per_page'];
?>
<section class="archive-resources">
<section class="archive-posts resources">
<header>
<h2>
<?php
if ( is_post_type_archive($thiscustomposttype) ):
//post_type_archive_title();
else:
echo $thiscustomposttype;
endif;?>
// if ( is_post_type_archive() ):
post_type_archive_title();
// else:
// echo $thiscustomposttype;
// endif;
?>
</h2>
</header>
<main class="">