added more info, edited arxiu and styled category convocatories

This commit is contained in:
jorge 2024-05-22 19:30:00 +02:00
parent c766b45be8
commit 1dd1cd99ea
13 changed files with 4419 additions and 239 deletions

3577
adminstyles.css Normal file

File diff suppressed because it is too large Load Diff

50
adminstyles.css.map Normal file

File diff suppressed because one or more lines are too long

View File

@ -31,8 +31,6 @@ get_header();
<?php endif; //end in_category agenda activitats ?> <?php endif; //end in_category agenda activitats ?>
</aside> </aside>
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>"> <content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
@ -53,15 +51,15 @@ get_header();
$the_query_archive_activitats = new WP_Query( $the_query_archive_activitats = new WP_Query(
array( array(
'post_type' => 'post', //'post_type' => 'post',
'posts_per_page' => '-1', //show all => -1 //'posts_per_page' => '-1', //show all => -1
'tax_query' => array( //'tax_query' => array(
array( // array(
'taxonomy' => 'category', // 'taxonomy' => 'category',
'field' => 'slug', // 'field' => 'slug',
'terms' => 'activitats' // 'terms' => 'activitats'
) // )
), //),
'meta_query' => array( 'meta_query' => array(
array( //filter results show only older than today array( //filter results show only older than today
'key' => 'xxp_agenda_date_end', 'key' => 'xxp_agenda_date_end',
@ -87,6 +85,29 @@ get_header();
wp_reset_postdata(); //reset custom query wp_reset_postdata(); //reset custom query
//end in_category agenda activitats //end in_category agenda activitats
} elseif (in_category( array( 'convocatories') ) ) {
$the_query_archive_convocatories = new WP_Query(
array(
'post_type' => 'post',
'posts_per_page' => '-1', //show all => -1
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'convocatories'
)
),
)
);
if ( $the_query_archive_convocatories->have_posts() ) :
while ( $the_query_archive_convocatories->have_posts() ) : $the_query_archive_convocatories->the_post();
get_template_part( 'template-parts/section', 'eachconvo' );
endwhile;//end of the loop
endif; //end if the_query_archive_activitats
wp_reset_postdata(); //reset custom query
//end in_category convocatories
}else{ }else{
//the rest of archives //the rest of archives
while ( have_posts() ) : while ( have_posts() ) :

File diff suppressed because one or more lines are too long

View File

@ -35,57 +35,11 @@ get_header();
endif; endif;
?> ?>
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-calls xarxaprod-convos-filtrats">
<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
// comparing dates
// https://wordpress.stackexchange.com/a/12305
$the_query_archive_convo = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'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
//'posts_per_page' => '-1', //show all
'posts_per_page' => '4',
'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',
)
)
)
);
?>
<?php if ( $the_query_archive_convo->have_posts() ) : ?>
<content class="archive-posts archive-xarxaprod-convo <?php //xarxaprod_class_posttype(); ?>">
<?php while ( $the_query_archive_convo->have_posts() ) : $the_query_archive_convo->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 convo ?>
</section>
<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-agenda xarxaprod-activitats-filtrats category-agenda xarxaprod-activitats">
<header>
<h2 class="section-title"><a href="#">Activitats pasades</a></h2>
</header>
<aside id="agendafilter" class="xarxaprod-filter-agenda xarxaprod-fitre-agenda"> <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 include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
@ -143,6 +97,56 @@ get_header();
</section> </section>
<section id="filteredcalls" class="xarxaprod-filtered-content xarxaprod-filtered-content xarxaprod-filtered-calls xarxaprod-convos-filtrats">
<header>
<h2 class="section-title"><a href="#">Convocatories</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
// comparing dates
// https://wordpress.stackexchange.com/a/12305
$the_query_archive_convo = new WP_Query(
array(
'post_type' => 'xarxaprod-convo',
'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
//'posts_per_page' => '-1', //show all
'posts_per_page' => '4',
'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',
)
)
)
);
?>
<?php if ( $the_query_archive_convo->have_posts() ) : ?>
<content class="archive-posts archive-xarxaprod-convo <?php //xarxaprod_class_posttype(); ?>">
<?php while ( $the_query_archive_convo->have_posts() ) : $the_query_archive_convo->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 convo ?>
</section>
</main><!-- #main --> </main><!-- #main -->

View File

@ -392,7 +392,19 @@
* REC * REC
* *
* * * * * * * * * * * * * * * */ * * * * * * * * * * * * * * * */
.xarxaprod-cards,.category-convocatories, .category-rec { .archive.category-convocatories {
main {
> aside {
grid-column: -1 / 1;
}
> .archive-posts.category-convocatories {
grid-column: -1 / 1;
grid-template-columns: repeat(3, 1fr);
}
}
}
//.xarxaprod-cards,.category-convocatories, .category-rec {
.xarxaprod-cards,.category-rec {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
justify-content: flex-end; justify-content: flex-end;

View File

@ -91,6 +91,9 @@
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
gap: $grid__gap; gap: $grid__gap;
> header {
grid-column: -1 / 1;
}
.archive-posts { .archive-posts {
} }
} }

View File

@ -5,7 +5,7 @@ Theme URI: https://git.hangar.org/xarxaprod/
Author: Hangar Tech Lab Author: Hangar Tech Lab
Author URI: https://hangar.org 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> 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 Tested up to: 6.5.2
Requires PHP: 7.4 Requires PHP: 7.4
License: GNU General Public License v3 or later License: GNU General Public License v3 or later

783
style.css

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -29,6 +29,13 @@
); );
?> ?>
</div><!-- .entry-content --> </div><!-- .entry-content -->
<?php if( get_field('xxp_moreinfo_url') ): ?>
<div class="xarxaprod-moreinfo-url">
<a href="<?php echo get_field('xxp_moreinfo_url'); ?>" class="button button-more button-letsgo">
<?php echo __( '+ Info', 'xarxaprod' ); ?>
</a>
</div>
<?php endif; ?>
<?php if ( get_edit_post_link() ) : ?> <?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer"> <footer class="entry-footer">

View File

@ -74,6 +74,15 @@
) )
); );
?> ?>
<?php if( get_field('xxp_moreinfo_url') ): ?>
<div class="xarxaprod-moreinfo-url">
<a href="<?php echo get_field('xxp_moreinfo_url'); ?>" class="button button-more button-letsgo">
<?php echo __( '+ Info', 'xarxaprod' ); ?>
</a>
</div>
<?php endif; ?>
</main><!-- .entry-content --> </main><!-- .entry-content -->
<footer class="entry-footer"> <footer class="entry-footer">

View File

@ -20,6 +20,7 @@
</h3> </h3>
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') || get_field('xxp_convo_espai_associat') || get_field('xxp_convoer_name')): ?>
<section class="xarxaprod-convo-info-fields"> <section class="xarxaprod-convo-info-fields">
<ul> <ul>
<li class="xarxaprod-convo-info-date"> <li class="xarxaprod-convo-info-date">
@ -37,7 +38,7 @@
<span class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></span> <span class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></span>
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<?php endif; ?> <?php endif;//end xxp_convo_apply_begin or xxp_convo_apply_end ?>
</li> </li>
<?php if( ! get_field('xxp_convo_espai_associat') ): ?> <?php if( ! get_field('xxp_convo_espai_associat') ): ?>
<?php // read here howto ?> <?php // read here howto ?>
@ -61,6 +62,7 @@
<?php endif; //end get_field('xxp_convo_espai_associat') ?> <?php endif; //end get_field('xxp_convo_espai_associat') ?>
</ul> </ul>
</section> </section>
<?php endif;//end xxp_convo_apply_begin or xxp_convo_apply_end ?>