edited archive, added template for archived convos and activities. styled
This commit is contained in:
parent
1dd1cd99ea
commit
881494e427
|
@ -17,7 +17,7 @@ Theme URI: https://git.hangar.org/xarxaprod/
|
|||
Author: Hangar Tech Lab
|
||||
Author URI: https://hangar.org
|
||||
Description: theme for the <a href="https://xarxaprod.cat">XarxaProd</a>. Inclou la possibilitat de publicar, catalogar i cercar ajuts, resoldre dubtes amb FAQs i altres. Design by Eudald Van der Pla <a href="https://vanderpla.com">vanderpla.com</a>. Coding template and theme by <a href="https://vitrubio.net">Jorge - vitrubio.net</a>
|
||||
Version: 1.7.6
|
||||
Version: 1.7.7
|
||||
Tested up to: 6.5.2
|
||||
Requires PHP: 7.4
|
||||
License: GNU General Public License v3 or later
|
||||
|
@ -2396,6 +2396,10 @@ Add your custom styles in this file so it is easier to update the theme.
|
|||
|
||||
/* mapas leaflet associats */
|
||||
|
||||
/*
|
||||
* Arxiu
|
||||
* */
|
||||
|
||||
/*
|
||||
* categories:
|
||||
* convocatorias pre 2024
|
||||
|
@ -2795,6 +2799,19 @@ Add your custom styles in this file so it is easier to update the theme.
|
|||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .xarxaprod-filtered-arxiu > header {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .xarxaprod-filtered-arxiu > aside {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .xarxaprod-filtered-arxiu > .archive-posts {
|
||||
grid-column: -1 / 1;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .archive.category-convocatories main > aside {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying the "agenda" activities with search capabilities
|
||||
* The template for displaying the "convos" calls with search capabilities
|
||||
*
|
||||
* Template Name: Agenda Arxiu
|
||||
* Template Name: Arxiu Activitats
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/
|
||||
|
@ -18,6 +18,8 @@ get_header();
|
|||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
</header><!-- .page-header -->
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
|
@ -29,46 +31,40 @@ get_header();
|
|||
the_posts_navigation();
|
||||
|
||||
else :
|
||||
//get_template_part( 'template-parts/content', 'none' );
|
||||
get_template_part( 'template-parts/content', 'none' );
|
||||
|
||||
endif;
|
||||
?>
|
||||
<section id="filteredagenda" class="xarxaprod-filtered-content xarxaprod-filtered-agenda xarxaprod-activitats-filtrats category-agenda xarxaprod-activitats">
|
||||
|
||||
<section id="arxiuactivitats" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-agenda xarxaprod-arxiu-activitats">
|
||||
<header>
|
||||
</header>
|
||||
|
||||
<aside id="agendafilter" class="xarxaprod-filter-agenda xarxaprod-fitre-agenda">
|
||||
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||
<?php } //end if is_plugin_active ?>
|
||||
<?php wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'menu-3',
|
||||
'menu_id' => 'agenda-menu',
|
||||
)
|
||||
); ?>
|
||||
</aside>
|
||||
|
||||
<?php
|
||||
$the_query_archive_agenda = new WP_Query(
|
||||
array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => '40', //show all => -1
|
||||
'posts_per_page' => '-1', //show all => -1
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'category',
|
||||
'field' => 'slug',
|
||||
'terms' => 'activitats'
|
||||
)
|
||||
),
|
||||
'order_by' => 'meta_value', //order by meta value
|
||||
'order' => 'ASC', //order ascendent
|
||||
'meta_query' => array(
|
||||
array( //filter results show only older than today
|
||||
'key' => 'xxp_agenda_date_end',
|
||||
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
|
||||
'compare' => '<', //show events before today
|
||||
'type' => 'DATE',
|
||||
)
|
||||
)
|
||||
//'order_by' => 'meta_value', //order by meta value
|
||||
//'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
|
||||
//'order' => 'ASC', //order ascendent
|
||||
//'meta_query' => array(
|
||||
// array( //filter results show only older than today
|
||||
// 'key' => 'xxp_convo_apply_end',
|
||||
// 'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
|
||||
// 'compare' => '<', //show events before today
|
||||
// 'type' => 'DATE',
|
||||
// )
|
||||
//)
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
@ -87,9 +83,10 @@ get_header();
|
|||
?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</content>
|
||||
<?php endif; //end query convo ?>
|
||||
<?php endif; //end query agenda ?>
|
||||
|
||||
</section>
|
||||
|
||||
</main><!-- #main -->
|
||||
|
||||
<?php
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* The template for displaying the "convos" calls with search capabilities
|
||||
*
|
||||
* Template Name: Convos antigues arxiu
|
||||
* Template Name: Arxiu Convos
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/
|
||||
|
@ -35,12 +35,13 @@ get_header();
|
|||
|
||||
endif;
|
||||
?>
|
||||
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-calls xarxaprod-convos-filtrats">
|
||||
|
||||
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-convos">
|
||||
|
||||
<aside id="callsfilter" class="xarxaprod-filter-calls xarxaprod-fitre-convos">
|
||||
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||
<?php xarxaprod_convos_filters_form(); // function defined in the plugin ?>
|
||||
<?php } //end if is_plugin_active ?>
|
||||
<?php //include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||
<?php //xarxaprod_convos_filters_form(); // function defined in the plugin ?>
|
||||
<?php //} //end if is_plugin_active ?>
|
||||
</aside>
|
||||
|
||||
<?php
|
|
@ -36,27 +36,19 @@ get_header();
|
|||
endif;
|
||||
?>
|
||||
|
||||
<section id="filteredagenda" class="xarxaprod-filtered-content xarxaprod-filtered-agenda xarxaprod-activitats-filtrats category-agenda xarxaprod-activitats">
|
||||
<section id="filteredagenda" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-agenda xarxaprod-arxiu-activitats">
|
||||
<header>
|
||||
<h2 class="section-title"><a href="#">Activitats pasades</a></h2>
|
||||
<h2 class="section-title"><a href="<?php echo site_url(); ?>/arxiu-activitats">Activitats pasades</a></h2>
|
||||
</header>
|
||||
|
||||
<aside id="agendafilter" class="xarxaprod-filter-agenda xarxaprod-fitre-agenda">
|
||||
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||
<?php } //end if is_plugin_active ?>
|
||||
<?php wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'menu-3',
|
||||
'menu_id' => 'agenda-menu',
|
||||
)
|
||||
); ?>
|
||||
</aside>
|
||||
|
||||
<?php
|
||||
$the_query_archive_agenda = new WP_Query(
|
||||
array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => '4', //show all => -1
|
||||
'posts_per_page' => '3', //show all => -1
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'category',
|
||||
|
@ -65,7 +57,6 @@ get_header();
|
|||
)
|
||||
),
|
||||
'order_by' => 'meta_value', //order by meta value
|
||||
//'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
|
||||
'order' => 'ASC', //order ascendent
|
||||
'meta_query' => array(
|
||||
array( //filter results show only older than today
|
||||
|
@ -93,18 +84,15 @@ get_header();
|
|||
?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</content>
|
||||
<?php endif; //end query convo ?>
|
||||
<?php endif; //end query agenda ?>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-calls xarxaprod-convos-filtrats">
|
||||
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-arxiu xarxaprod-arxiu-convos">
|
||||
<header>
|
||||
<h2 class="section-title"><a href="#">Convocatories</a></h2>
|
||||
<h2 class="section-title"><a href="<?php echo site_url(); ?>/arxiu-convocatories">Convocatories pasades</a></h2>
|
||||
</header>
|
||||
<aside id="callsfilter" class="xarxaprod-filter-calls xarxaprod-fitre-convos">
|
||||
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||
<?php xarxaprod_convos_filters_form(); // function defined in the plugin ?>
|
||||
<?php } //end if is_plugin_active ?>
|
||||
</aside>
|
||||
|
||||
<?php
|
||||
|
@ -117,7 +105,7 @@ get_header();
|
|||
'meta_key' => 'xxp_convo_apply_end', // order by meta key convo apply end
|
||||
'order' => 'ASC', //order ascendent
|
||||
//'posts_per_page' => '-1', //show all
|
||||
'posts_per_page' => '4',
|
||||
'posts_per_page' => '3',
|
||||
'meta_query' => array(
|
||||
array( //filter results show only older than today
|
||||
'key' => 'xxp_convo_apply_end',
|
||||
|
@ -147,6 +135,48 @@ get_header();
|
|||
<?php endif; //end query convo ?>
|
||||
|
||||
</section>
|
||||
<section id="filteredcalls-pre2024" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-calls xarxaprod-convos-filtrats">
|
||||
<header>
|
||||
<h2 class="section-title"><a href="<?php echo site_url(); ?>/convocatories-pre-2024/">Convocatories pre 2024</a></h2>
|
||||
</header>
|
||||
<aside id="callsfilter" class="xarxaprod-filter-calls xarxaprod-fitre-convos">
|
||||
</aside>
|
||||
<?php
|
||||
// comparing dates
|
||||
// https://wordpress.stackexchange.com/a/12305
|
||||
$the_query_archive_convopre2024 = new WP_Query(
|
||||
// uncomment below to activate preview of pre 2024 convos
|
||||
// array(
|
||||
// 'post_type' => 'post',
|
||||
// 'posts_per_page' => '4', //show all => -1
|
||||
// 'tax_query' => array(
|
||||
// array(
|
||||
// 'taxonomy' => 'category',
|
||||
// 'field' => 'slug',
|
||||
// 'terms' => 'convocatories'
|
||||
// )
|
||||
// ),
|
||||
// )
|
||||
// uncomment above to activate preview of pre 2024 convos
|
||||
);
|
||||
?>
|
||||
<?php if ( $the_query_archive_convopre2024->have_posts() ) : ?>
|
||||
<content class="archive-posts category-convocatoriespre2024">
|
||||
<?php while ( $the_query_archive_convopre2024->have_posts() ) : $the_query_archive_convopre2024->the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'template-parts/section', 'eachconvo' ); ?>
|
||||
|
||||
<?php endwhile;//end of the loop ?>
|
||||
<?php
|
||||
// pagination will not work for custom_query
|
||||
// https://wordpress.stackexchange.com/a/120408
|
||||
// how to fix it
|
||||
the_posts_navigation();
|
||||
?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</content>
|
||||
<?php endif; //end query convopre2024 ?>
|
||||
</section>
|
||||
|
||||
</main><!-- #main -->
|
||||
|
||||
|
|
|
@ -386,6 +386,22 @@
|
|||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Arxiu
|
||||
* */
|
||||
.xarxaprod-filtered-arxiu {
|
||||
> header {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
> aside {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
> .archive-posts {
|
||||
grid-column: -1 / 1;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* categories:
|
||||
* convocatorias pre 2024
|
||||
|
|
16
style.css
16
style.css
|
@ -2627,6 +2627,22 @@ textarea {
|
|||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
|
||||
/*
|
||||
* Arxiu
|
||||
* */
|
||||
.xarxaprod-filtered-arxiu > header {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
|
||||
.xarxaprod-filtered-arxiu > aside {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
|
||||
.xarxaprod-filtered-arxiu > .archive-posts {
|
||||
grid-column: -1 / 1;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
|
||||
/*
|
||||
* categories:
|
||||
* convocatorias pre 2024
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue