Compare commits
2 Commits
2e3cf194fe
...
1dd1cd99ea
Author | SHA1 | Date |
---|---|---|
jorge | 1dd1cd99ea | |
jorge | c766b45be8 |
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
43
archive.php
43
archive.php
|
@ -31,8 +31,6 @@ get_header();
|
|||
<?php endif; //end in_category agenda activitats ?>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
|
||||
|
@ -53,15 +51,15 @@ get_header();
|
|||
|
||||
$the_query_archive_activitats = new WP_Query(
|
||||
array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => '-1', //show all => -1
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'category',
|
||||
'field' => 'slug',
|
||||
'terms' => 'activitats'
|
||||
)
|
||||
),
|
||||
//'post_type' => 'post',
|
||||
//'posts_per_page' => '-1', //show all => -1
|
||||
//'tax_query' => array(
|
||||
// array(
|
||||
// 'taxonomy' => 'category',
|
||||
// 'field' => 'slug',
|
||||
// 'terms' => 'activitats'
|
||||
// )
|
||||
//),
|
||||
'meta_query' => array(
|
||||
array( //filter results show only older than today
|
||||
'key' => 'xxp_agenda_date_end',
|
||||
|
@ -87,6 +85,29 @@ get_header();
|
|||
wp_reset_postdata(); //reset custom query
|
||||
|
||||
//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{
|
||||
//the rest of archives
|
||||
while ( have_posts() ) :
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -35,57 +35,11 @@ get_header();
|
|||
|
||||
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">
|
||||
<header>
|
||||
<h2 class="section-title"><a href="#">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?>
|
||||
|
@ -143,6 +97,56 @@ get_header();
|
|||
|
||||
</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 -->
|
||||
|
||||
|
|
|
@ -27,13 +27,13 @@ input[type="submit"],
|
|||
color: $color__white;
|
||||
}
|
||||
}
|
||||
.category-faq {
|
||||
.button-more {
|
||||
&::before {
|
||||
content: "accedir";
|
||||
}
|
||||
}
|
||||
}
|
||||
//.category-faq {
|
||||
// .button-more {
|
||||
// &::before {
|
||||
// content: "accedir";
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
.xarxaprod-search-form {
|
||||
display: flex;
|
||||
|
|
|
@ -392,7 +392,19 @@
|
|||
* 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;
|
||||
flex-flow: column;
|
||||
justify-content: flex-end;
|
||||
|
|
|
@ -91,6 +91,9 @@
|
|||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: $grid__gap;
|
||||
> header {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
.archive-posts {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,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.5
|
||||
Version: 1.7.7
|
||||
Tested up to: 6.5.2
|
||||
Requires PHP: 7.4
|
||||
License: GNU General Public License v3 or later
|
||||
|
|
24
style.css
24
style.css
|
@ -5,7 +5,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.5
|
||||
Version: 1.7.7
|
||||
Tested up to: 6.5.2
|
||||
Requires PHP: 7.4
|
||||
License: GNU General Public License v3 or later
|
||||
|
@ -1442,10 +1442,6 @@ input[type="submit"]:focus,
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
.category-faq .button-more::before {
|
||||
content: "accedir";
|
||||
}
|
||||
|
||||
.xarxaprod-search-form {
|
||||
display: flex;
|
||||
margin: 0.5rem 0;
|
||||
|
@ -1668,6 +1664,10 @@ textarea {
|
|||
gap: 1rem;
|
||||
}
|
||||
|
||||
.xarxaprod-filtered-content > header {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
|
||||
.site-footer {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
|
@ -2633,8 +2633,16 @@ textarea {
|
|||
* REC
|
||||
*
|
||||
* * * * * * * * * * * * * * * */
|
||||
.archive.category-convocatories main > aside {
|
||||
grid-column: -1 / 1;
|
||||
}
|
||||
|
||||
.archive.category-convocatories main > .archive-posts.category-convocatories {
|
||||
grid-column: -1 / 1;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
|
||||
.xarxaprod-cards,
|
||||
.category-convocatories,
|
||||
.category-rec {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
@ -2643,7 +2651,6 @@ textarea {
|
|||
}
|
||||
|
||||
.xarxaprod-cards .wp-block-post-title,
|
||||
.category-convocatories .wp-block-post-title,
|
||||
.category-rec .wp-block-post-title {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0.5em;
|
||||
|
@ -2653,8 +2660,6 @@ textarea {
|
|||
|
||||
.xarxaprod-cards .post-excerpt,
|
||||
.xarxaprod-cards .wp-block-post-excerpt,
|
||||
.category-convocatories .post-excerpt,
|
||||
.category-convocatories .wp-block-post-excerpt,
|
||||
.category-rec .post-excerpt,
|
||||
.category-rec .wp-block-post-excerpt {
|
||||
min-height: 7rem;
|
||||
|
@ -2664,7 +2669,6 @@ textarea {
|
|||
}
|
||||
|
||||
.xarxaprod-cards .wp-block-read-more,
|
||||
.category-convocatories .wp-block-read-more,
|
||||
.category-rec .wp-block-read-more {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,6 +29,13 @@
|
|||
);
|
||||
?>
|
||||
</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() ) : ?>
|
||||
<footer class="entry-footer">
|
||||
|
|
|
@ -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 -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
</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">
|
||||
<ul>
|
||||
<li class="xarxaprod-convo-info-date">
|
||||
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
|
||||
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
|
||||
<dt>Termini</dt>
|
||||
<dd class="xarxaprod-label item-xxp_convo_dates">
|
||||
<?php if( get_field('xxp_convo_apply_begin') ): ?>
|
||||
|
@ -37,9 +38,9 @@
|
|||
<span class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></span>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif;//end xxp_convo_apply_begin or xxp_convo_apply_end ?>
|
||||
</li>
|
||||
<?php if( ! get_field('xxp_convo_espai_associat') ): ?>
|
||||
<?php if( ! get_field('xxp_convo_espai_associat') ): ?>
|
||||
<?php // read here howto ?>
|
||||
<?php // https://www.advancedcustomfields.com/resources/relationship/#display-list-of-posts-with-setuppostdata ?>
|
||||
<?php if( get_field('xxp_convoer_name') ): ?>
|
||||
|
@ -58,9 +59,10 @@
|
|||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php // Reset the global post object so that the rest of the page works correctly.?>
|
||||
<?php endif; //end get_field('xxp_convo_espai_associat') ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php endif; //end get_field('xxp_convo_espai_associat') ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php endif;//end xxp_convo_apply_begin or xxp_convo_apply_end ?>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue