added old funds to fund search view, styled
This commit is contained in:
parent
1eb53cc5a4
commit
95f13e85b0
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -45,7 +45,7 @@ get_header();
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
|
||||||
<content class="archive-posts archive-xarxaprod-fund archive-xarxapdor-ajut <?php //xarxaprod_class_posttype(); ?>">
|
<content class="archive-posts archive-xarxaprod-fund archive-xarxaprod-ajut <?php //xarxaprod_class_posttype(); ?>">
|
||||||
<?php
|
<?php
|
||||||
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
|
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
|
||||||
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
|
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
|
||||||
|
@ -79,8 +79,44 @@ get_header();
|
||||||
<?php wp_reset_postdata(); ?>
|
<?php wp_reset_postdata(); ?>
|
||||||
<?php endif; //end query ajut ?>
|
<?php endif; //end query ajut ?>
|
||||||
</content>
|
</content>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
<section id="teminis-passats" class="terminis-tancats">
|
||||||
|
<content class="archive-posts archive-posts-old archive-xarxaprod-fund archive-xarxaprod-ajut <?php //xarxaprod_class_posttype(); ?>">
|
||||||
|
<h2>Terminis tancats</h2>
|
||||||
|
<?php
|
||||||
|
// https://support.advancedcustomfields.com/forums/topic/wp_query-using-meta_query-for-an-acf-checkbox-field/#post-145830
|
||||||
|
// https://www.advancedcustomfields.com/resources/checkbox/#query-posts
|
||||||
|
// https://barn2.com/blog/querying-posts-by-custom-field-acfi/
|
||||||
|
|
||||||
|
$the_query_ajut_old = new WP_Query(
|
||||||
|
array(
|
||||||
|
'post_type' => 'xarxaprod-ajut',
|
||||||
|
'posts_per_page' => '-1',
|
||||||
|
'meta_key' => 'xxp_fund_apply_end', // order by meta key convo apply end
|
||||||
|
'meta_query' => array(
|
||||||
|
array( //filter results show only older than today
|
||||||
|
'key' => 'xxp_fund_apply_end',
|
||||||
|
'value' => date("Y-m-d"), // consider using date_i18n() https://developer.wordpress.org/reference/functions/date_i18n/
|
||||||
|
'compare' => '<', //show events from today and later
|
||||||
|
'type' => 'DATE',
|
||||||
|
)
|
||||||
|
),
|
||||||
|
//https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
|
||||||
|
'orderby' => 'meta_value', //order by meta value
|
||||||
|
'order' => 'DESC', //order ascendent
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<?php if ( $the_query_ajut_old->have_posts() ) : ?>
|
||||||
|
<?php while ( $the_query_ajut_old->have_posts() ) : $the_query_ajut_old->the_post(); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'template-parts/section', 'eachfund' ); ?>
|
||||||
|
|
||||||
|
<?php endwhile;//end of the loop ?>
|
||||||
|
<?php wp_reset_postdata(); ?>
|
||||||
|
<?php endif; //end query ajut ?>
|
||||||
|
</content>
|
||||||
|
</section>
|
||||||
|
|
||||||
</main><!-- #main -->
|
</main><!-- #main -->
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,7 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
.xarxaprod-fund-info-field {
|
.xarxaprod-fund-info-field {
|
||||||
|
margin: 0;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
border-bottom: $border__line;
|
border-bottom: $border__line;
|
||||||
}
|
}
|
||||||
|
@ -160,20 +161,13 @@
|
||||||
p {
|
p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.xarxaprod-fund-original-title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
li {
|
li {
|
||||||
font-size: $font__size-body*1.3;
|
font-size: $font__size-body*1.3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.xarxaprod-fund-info-contact-fields {
|
|
||||||
.xarxaprod-fund-info-field {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.xarxaprod-fund-info-fields {
|
|
||||||
.xarxaprod-fund-info-field {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.xarxaprod-funder-name,
|
.xarxaprod-funder-name,
|
||||||
.xarxaprod-fund-contact-name,
|
.xarxaprod-fund-contact-name,
|
||||||
.xarxaprod-fund-web {
|
.xarxaprod-fund-web {
|
||||||
|
|
|
@ -134,6 +134,11 @@
|
||||||
grid-template-columns: repeat(1 , 1fr);
|
grid-template-columns: repeat(1 , 1fr);
|
||||||
gap: $grid__gap * 1.5;
|
gap: $grid__gap * 1.5;
|
||||||
}
|
}
|
||||||
|
.archive-posts-old {
|
||||||
|
margin-top: 2rem;
|
||||||
|
padding-top: 1rem;
|
||||||
|
border-top: $border__line;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 48em) {
|
@media screen and (max-width: 48em) {
|
||||||
//only smaller than 48em
|
//only smaller than 48em
|
||||||
|
@ -275,6 +280,13 @@
|
||||||
&.archive-posts-map,&.archive-xarxaprod-members,&archive-xarxaprod-associats {
|
&.archive-posts-map,&.archive-xarxaprod-members,&archive-xarxaprod-associats {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
&.archive-posts-old {
|
||||||
|
grid-template-columns: repeat(3 , 1fr);
|
||||||
|
margin-top: 2rem;
|
||||||
|
h2 {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.xarxaprod-faqs-aside {
|
.xarxaprod-faqs-aside {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
29
style.css
29
style.css
|
@ -1717,6 +1717,12 @@ textarea {
|
||||||
grid-template-columns: repeat(1, 1fr);
|
grid-template-columns: repeat(1, 1fr);
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.archive-posts-old {
|
||||||
|
margin-top: 2rem;
|
||||||
|
padding-top: 1rem;
|
||||||
|
border-top: 0.05rem solid #000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 48em) {
|
@media screen and (max-width: 48em) {
|
||||||
|
@ -1870,6 +1876,15 @@ textarea {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.archive-posts.archive-posts-old {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.archive-posts.archive-posts-old h2 {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
|
||||||
.xarxaprod-faqs-aside {
|
.xarxaprod-faqs-aside {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
@ -2351,6 +2366,7 @@ textarea {
|
||||||
|
|
||||||
.xarxaprod-fund-info-fields .xarxaprod-fund-info-field,
|
.xarxaprod-fund-info-fields .xarxaprod-fund-info-field,
|
||||||
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-info-field {
|
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-info-field {
|
||||||
|
margin: 0;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
border-bottom: 0.05rem solid #000;
|
border-bottom: 0.05rem solid #000;
|
||||||
}
|
}
|
||||||
|
@ -2372,19 +2388,16 @@ textarea {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.xarxaprod-fund-info-fields .xarxaprod-fund-original-title,
|
||||||
|
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-original-title {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
.xarxaprod-fund-info-fields li,
|
.xarxaprod-fund-info-fields li,
|
||||||
.xarxaprod-fund-info-contact-fields li {
|
.xarxaprod-fund-info-contact-fields li {
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xarxaprod-fund-info-contact-fields .xarxaprod-fund-info-field {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xarxaprod-fund-info-fields .xarxaprod-fund-info-field {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xarxaprod-funder-name,
|
.xarxaprod-funder-name,
|
||||||
.xarxaprod-fund-contact-name,
|
.xarxaprod-fund-contact-name,
|
||||||
.xarxaprod-fund-web {
|
.xarxaprod-fund-web {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -21,6 +21,12 @@
|
||||||
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
|
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if( get_field('xxp_fund_original_title') ): ?>
|
||||||
|
<div class="xarxaprod-fund-info-field">
|
||||||
|
<p class="xarxaprod-fund-original-title"><?php the_field('xxp_fund_original_title'); ?></p>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if( get_field('xxp_funder_name') ): ?>
|
<?php if( get_field('xxp_funder_name') ): ?>
|
||||||
<div class="xarxaprod-fund-info-field">
|
<div class="xarxaprod-fund-info-field">
|
||||||
<p class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></p>
|
<p class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></p>
|
||||||
|
@ -77,21 +83,6 @@
|
||||||
|
|
||||||
<section class="xarxaprod-fund-info-fields">
|
<section class="xarxaprod-fund-info-fields">
|
||||||
|
|
||||||
<div class="xarxaprod-fund-info-field">
|
|
||||||
<h6>Dirigit a</h6>
|
|
||||||
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="xarxaprod-fund-info-field">
|
|
||||||
<h6>Tipus d'ajuda</h6>
|
|
||||||
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="xarxaprod-fund-info-field">
|
|
||||||
<h6>Sectors</h6>
|
|
||||||
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="xarxaprod-fund-info-field">
|
<div class="xarxaprod-fund-info-field">
|
||||||
<h6>Termini</h6>
|
<h6>Termini</h6>
|
||||||
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
|
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
|
||||||
|
@ -109,10 +100,25 @@
|
||||||
<?php if( get_field('xxp_fund_web') ): ?>
|
<?php if( get_field('xxp_fund_web') ): ?>
|
||||||
<div class="xarxaprod-fund-info-field">
|
<div class="xarxaprod-fund-info-field">
|
||||||
<h6>+ Informació</h6>
|
<h6>+ Informació</h6>
|
||||||
<p><a href="<?php echo get_field('xxp_fund_web'); ?>" class="button button-more button-letsgo">ves-hi</a></p>
|
<p><a href="<?php echo get_field('xxp_fund_web'); ?>" class="button button-more button-letsgo">convocatória</a></p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="xarxaprod-fund-info-field">
|
||||||
|
<h6>Dirigit a</h6>
|
||||||
|
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="xarxaprod-fund-info-field">
|
||||||
|
<h6>Tipus d'ajuda</h6>
|
||||||
|
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="xarxaprod-fund-info-field">
|
||||||
|
<h6>Sectors</h6>
|
||||||
|
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="xarxaprod-fund-info-field">
|
<div class="xarxaprod-fund-info-field">
|
||||||
<h6>Necessites assesorament?</h6>
|
<h6>Necessites assesorament?</h6>
|
||||||
<p><a href="<?php echo esc_url( home_url( '/consultoria/' ) ); ?>" class="button button-more button-ourservices">Oferim serveis de consultoria</a></p>
|
<p><a href="<?php echo esc_url( home_url( '/consultoria/' ) ); ?>" class="button button-more button-ourservices">Oferim serveis de consultoria</a></p>
|
||||||
|
|
Loading…
Reference in New Issue