Compare commits

..

4 Commits

Author SHA1 Message Date
jorge 79cd3f78ff migrated os_ to xxp_ queries 2024-02-22 23:36:56 +01:00
jorge 2e5d004522 migrated db and queries from os_ to xxp_ 2024-02-22 23:20:46 +01:00
jorge 7a2a92c589 added agenda seciont template 2024-02-22 18:42:56 +01:00
jorge 86c753a7ff edited spacing, renamed properly a query 2024-02-22 18:42:34 +01:00
13 changed files with 171 additions and 116 deletions

View File

@ -993,39 +993,39 @@ Add your custom styles in this file so it is easier to update the theme.
font-size: 0.7rem;
}
.edit-post-visual-editor__content-area .home .item-os_fund_target li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-os_fund_target li {
.edit-post-visual-editor__content-area .home .item-xxp_fund_target li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-xxp_fund_target li {
background-color: #ff8d76;
}
.edit-post-visual-editor__content-area .home .item-os_fund_source li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-os_fund_source li {
.edit-post-visual-editor__content-area .home .item-xxp_fund_source li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-xxp_fund_source li {
background-color: #5bcee8;
}
.edit-post-visual-editor__content-area .home .item-os_fund_field li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-os_fund_field li {
.edit-post-visual-editor__content-area .home .item-xxp_fund_field li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-xxp_fund_field li {
background-color: #f6cc4c;
}
.edit-post-visual-editor__content-area .home .item-os_fund_dates li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-os_fund_dates li {
.edit-post-visual-editor__content-area .home .item-xxp_fund_dates li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-xxp_fund_dates li {
background-color: #69ed82;
}
.edit-post-visual-editor__content-area .home .item-os_fund_call,
.edit-post-visual-editor__content-area article:not(.type-post) .item-os_fund_call {
.edit-post-visual-editor__content-area .home .item-xxp_fund_call,
.edit-post-visual-editor__content-area article:not(.type-post) .item-xxp_fund_call {
display: block;
margin: 0.2rem 0;
}
.edit-post-visual-editor__content-area .home .item-os_fund_call li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-os_fund_call li {
.edit-post-visual-editor__content-area .home .item-xxp_fund_call li,
.edit-post-visual-editor__content-area article:not(.type-post) .item-xxp_fund_call li {
font-size: 1.2rem;
}
.edit-post-visual-editor__content-area .home .item-os_fund_apply_text,
.edit-post-visual-editor__content-area article:not(.type-post) .item-os_fund_apply_text {
.edit-post-visual-editor__content-area .home .item-xxp_fund_apply_text,
.edit-post-visual-editor__content-area article:not(.type-post) .item-xxp_fund_apply_text {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
@ -1069,7 +1069,7 @@ Add your custom styles in this file so it is easier to update the theme.
font-size: 1.1rem;
}
.edit-post-visual-editor__content-area .single-xarxaprod-ajut article:not(.type-post) .item-os_fund_apply_text {
.edit-post-visual-editor__content-area .single-xarxaprod-ajut article:not(.type-post) .item-xxp_fund_apply_text {
font-size: 1.1rem;
}
@ -1924,8 +1924,8 @@ Add your custom styles in this file so it is easier to update the theme.
grid: 1fr;
}
.edit-post-visual-editor__content-area .xarxaprod-filtered-content [class*="os_fund"] .filter,
.edit-post-visual-editor__content-area .xarxaprod-filtered-content [class*="os_convo"] .filter {
.edit-post-visual-editor__content-area .xarxaprod-filtered-content [class*="xxp_fund"] .filter,
.edit-post-visual-editor__content-area .xarxaprod-filtered-content [class*="xxp_convo"] .filter {
display: none;
}

File diff suppressed because one or more lines are too long

View File

@ -13,13 +13,13 @@ function my_pre_get_posts( $query ) {
// allow the url to alter the query
if( isset($_GET['os_fund_target']) )
if( isset($_GET['xxp_fund_target']) )
{
// get original meta query
$meta_query = [];
$meta_query[] = array('relation' => 'OR');
$meta_query[] = $query->get('meta_query');
$fieldsearchvalues= explode(',', $_GET['os_fund_target']);
$fieldsearchvalues= explode(',', $_GET['xxp_fund_target']);
foreach( $fieldsearchvalues as $fieldsearchvalue ){
$os_search_value = $fieldsearchvalue; //'entitat-publica'; // whatever
$os_field_value = sprintf( '^%1$s$|s:%2$u:"%1$s";', $os_search_value, strlen( $os_search_value ) );
@ -27,7 +27,7 @@ function my_pre_get_posts( $query ) {
// add aur meta query to the original meta queries
$meta_query[] = array(
array(
'key' => 'os_fund_target',
'key' => 'xxp_fund_target',
'value' => $os_field_value,
'compare' => 'REGEXP',
),

View File

@ -32,9 +32,9 @@ get_header();
if ( is_front_page() ) :
//get_template_part( 'template-parts/section', 'featured' );
get_template_part( 'template-parts/section', 'last-convos' );
get_template_part( 'template-parts/section', 'agenda' );
echo '<aside id="extra" class="extra-content contingut-extra">';
dynamic_sidebar( 'front-page-widgets' ); // including widget front page
dynamic_sidebar( 'front-page-widgets' ); // including widget front page
echo '</aside>';
endif;
?>

View File

@ -43,26 +43,26 @@ dd {
font-size: $font__size-body*0.7;
}
}
.item-os_fund_target li {
.item-xxp_fund_target li {
background-color: $color__orange;
}
.item-os_fund_source li {
.item-xxp_fund_source li {
background-color: $color__lightblue;
}
.item-os_fund_field li {
.item-xxp_fund_field li {
background-color: $color__yellow;
}
.item-os_fund_dates li {
.item-xxp_fund_dates li {
background-color: $color__green;
}
.item-os_fund_call {
.item-xxp_fund_call {
display: block;
margin:0.2rem 0;
li {
font-size: $font__size-body*1.2;
}
}
.item-os_fund_apply_text {
.item-xxp_fund_apply_text {
display:inline-block;
margin:0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
@ -105,7 +105,7 @@ dd {
font-size: $font__size-body*1.1;
}
}
.item-os_fund_apply_text {
.item-xxp_fund_apply_text {
font-size: $font__size-body*1.1;
}
}

View File

@ -95,7 +95,7 @@
.xarxaprod-filtered-content {
display:grid;
grid: 1fr;
[class*="os_fund"],[class*="os_convo"] {
[class*="xxp_fund"],[class*="xxp_convo"] {
.filter {
display: none;
}

View File

@ -853,39 +853,39 @@ article:not(.type-post) .xarxaprod-label li {
font-size: 0.7rem;
}
.home .item-os_fund_target li,
article:not(.type-post) .item-os_fund_target li {
.home .item-xxp_fund_target li,
article:not(.type-post) .item-xxp_fund_target li {
background-color: #ff8d76;
}
.home .item-os_fund_source li,
article:not(.type-post) .item-os_fund_source li {
.home .item-xxp_fund_source li,
article:not(.type-post) .item-xxp_fund_source li {
background-color: #5bcee8;
}
.home .item-os_fund_field li,
article:not(.type-post) .item-os_fund_field li {
.home .item-xxp_fund_field li,
article:not(.type-post) .item-xxp_fund_field li {
background-color: #f6cc4c;
}
.home .item-os_fund_dates li,
article:not(.type-post) .item-os_fund_dates li {
.home .item-xxp_fund_dates li,
article:not(.type-post) .item-xxp_fund_dates li {
background-color: #69ed82;
}
.home .item-os_fund_call,
article:not(.type-post) .item-os_fund_call {
.home .item-xxp_fund_call,
article:not(.type-post) .item-xxp_fund_call {
display: block;
margin: 0.2rem 0;
}
.home .item-os_fund_call li,
article:not(.type-post) .item-os_fund_call li {
.home .item-xxp_fund_call li,
article:not(.type-post) .item-xxp_fund_call li {
font-size: 1.2rem;
}
.home .item-os_fund_apply_text,
article:not(.type-post) .item-os_fund_apply_text {
.home .item-xxp_fund_apply_text,
article:not(.type-post) .item-xxp_fund_apply_text {
display: inline-block;
margin: 0.1em 0;
padding: 0.2em 0.2em 0 0.2em;
@ -929,7 +929,7 @@ article:not(.type-post) .item-os_fund_apply_text {
font-size: 1.1rem;
}
.single-xarxaprod-ajut article:not(.type-post) .item-os_fund_apply_text {
.single-xarxaprod-ajut article:not(.type-post) .item-xxp_fund_apply_text {
font-size: 1.1rem;
}
@ -1785,8 +1785,8 @@ textarea {
grid: 1fr;
}
.xarxaprod-filtered-content [class*="os_fund"] .filter,
.xarxaprod-filtered-content [class*="os_convo"] .filter {
.xarxaprod-filtered-content [class*="xxp_fund"] .filter,
.xarxaprod-filtered-content [class*="xxp_convo"] .filter {
display: none;
}

View File

@ -18,30 +18,30 @@
<section class="xarxaprod-fund-info-contact-fields">
<div class="xarxaprod-fund-info-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_call') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
</div>
<?php if( get_field('os_funder_name') ): ?>
<?php if( get_field('xxp_funder_name') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-funder-name"><?php the_field('os_funder_name'); ?></p>
<p class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_fund_contact_name') ): ?>
<?php if( get_field('xxp_fund_contact_name') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-contact-name"><?php the_field('os_fund_contact_name'); ?></p>
<p class="xarxaprod-fund-contact-name"><?php the_field('xxp_fund_contact_name'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_fund_contact_mail') ): ?>
<?php if( get_field('xxp_fund_contact_mail') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-contact-mail"><?php the_field('os_fund_contact_mail'); ?></p>
<p class="xarxaprod-fund-contact-mail"><?php the_field('xxp_fund_contact_mail'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_fund_contact_tel') ): ?>
<?php if( get_field('xxp_fund_contact_tel') ): ?>
<div class="xarxaprod-fund-info-field">
<p class="xarxaprod-fund-contact-tel"><?php the_field('os_fund_contact_tel'); ?></p>
<p class="xarxaprod-fund-contact-tel"><?php the_field('xxp_fund_contact_tel'); ?></p>
</div>
<?php endif; ?>
@ -79,37 +79,37 @@
<div class="xarxaprod-fund-info-field">
<h6>Dirigit a</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_target') ); ?>
<?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' => 'os_fund_source') ); ?>
<?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' => 'os_fund_field') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
</div>
<div class="xarxaprod-fund-info-field">
<h6>Termini</h6>
<?php if( get_field('os_fund_apply_begin') || get_field('os_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-os_fund_dates">
<li class="item-os_fund_apply_begin">del <?php the_field('os_fund_apply_begin'); ?> </li>
<li class="item-os_fund_apply_end">al <?php the_field('os_fund_apply_end'); ?> </li>
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li class="item-xxp_fund_apply_begin">del <?php the_field('xxp_fund_apply_begin'); ?> </li>
<li class="item-xxp_fund_apply_end">al <?php the_field('xxp_fund_apply_end'); ?> </li>
</ul>
<?php endif; ?>
<?php if( get_field('os_fund_apply_text') ): ?>
<p class="item-os_fund_apply_text"><?php the_field('os_fund_apply_text'); ?></p>
<?php if( get_field('xxp_fund_apply_text') ): ?>
<p class="item-xxp_fund_apply_text"><?php the_field('xxp_fund_apply_text'); ?></p>
<?php endif; ?>
</div>
<?php if( get_field('os_fund_web') ): ?>
<?php if( get_field('xxp_fund_web') ): ?>
<div class="xarxaprod-fund-info-field">
<h6>+ Informació</h6>
<p><a href="<?php echo get_field('os_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">ves-hi</a></p>
</div>
<?php endif; ?>

View File

@ -18,30 +18,30 @@
<section class="xarxaprod-convo-info-contact-fields">
<div class="xarxaprod-convo-info-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_convo_call') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_call') ); ?>
</div>
<?php if( get_field('os_convoer_name') ): ?>
<?php if( get_field('xxp_convoer_name') ): ?>
<div class="xarxaprod-convo-info-field">
<p class="xarxaprod-convoer-name"><?php the_field('os_convoer_name'); ?></p>
<p class="xarxaprod-convoer-name"><?php the_field('xxp_convoer_name'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_convo_contact_name') ): ?>
<?php if( get_field('xxp_convo_contact_name') ): ?>
<div class="xarxaprod-convo-info-field">
<p class="xarxaprod-convo-contact-name"><?php the_field('os_convo_contact_name'); ?></p>
<p class="xarxaprod-convo-contact-name"><?php the_field('xxp_convo_contact_name'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_convo_contact_mail') ): ?>
<?php if( get_field('xxp_convo_contact_mail') ): ?>
<div class="xarxaprod-convo-info-field">
<p class="xarxaprod-convo-contact-mail"><?php the_field('os_convo_contact_mail'); ?></p>
<p class="xarxaprod-convo-contact-mail"><?php the_field('xxp_convo_contact_mail'); ?></p>
</div>
<?php endif; ?>
<?php if( get_field('os_convo_contact_tel') ): ?>
<?php if( get_field('xxp_convo_contact_tel') ): ?>
<div class="xarxaprod-convo-info-field">
<p class="xarxaprod-convo-contact-tel"><?php the_field('os_convo_contact_tel'); ?></p>
<p class="xarxaprod-convo-contact-tel"><?php the_field('xxp_convo_contact_tel'); ?></p>
</div>
<?php endif; ?>
@ -79,42 +79,42 @@
<div class="xarxaprod-convo-info-field">
<h6>Sector</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_convo_field') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?>
</div>
<div class="xarxaprod-convo-info-field">
<h6>Territori</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_convo_territory') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_territory') ); ?>
</div>
<div class="xarxaprod-convo-info-field">
<h6>Serveis</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_convo_service') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_service') ); ?>
</div>
<div class="xarxaprod-convo-info-field">
<h6>Centre</h6>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_convo_center') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_center') ); ?>
</div>
<div class="xarxaprod-convo-info-field">
<h6>Termini</h6>
<?php if( get_field('os_convo_apply_begin') || get_field('os_convo_apply_end') ): ?>
<ul class="xarxaprod-label item-os_convo_dates">
<li class="item-os_convo_apply_begin">del <?php the_field('os_convo_apply_begin'); ?> </li>
<li class="item-os_convo_apply_end">al <?php the_field('os_convo_apply_end'); ?> </li>
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
<ul class="xarxaprod-label item-xxp_convo_dates">
<li class="item-xxp_convo_apply_begin">del <?php the_field('xxp_convo_apply_begin'); ?> </li>
<li class="item-xxp_convo_apply_end">al <?php the_field('xxp_convo_apply_end'); ?> </li>
</ul>
<?php endif; ?>
<?php if( get_field('os_convo_apply_text') ): ?>
<p class="item-os_convo_apply_text"><?php the_field('os_convo_apply_text'); ?></p>
<?php if( get_field('xxp_convo_apply_text') ): ?>
<p class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></p>
<?php endif; ?>
</div>
<?php if( get_field('os_convo_web') ): ?>
<?php if( get_field('xxp_convo_web') ): ?>
<div class="xarxaprod-convo-info-field">
<h6>+ Informació</h6>
<p><a href="<?php the_field('os_convo_web'); ?>" class="button button-more button-letsgo">ves-hi</a></p>
<p><a href="<?php the_field('xxp_convo_web'); ?>" class="button button-more button-letsgo">ves-hi</a></p>
</div>
<?php endif; ?>

View File

@ -0,0 +1,55 @@
<?php
/**
* Template part for displaying posts from category "agenda"
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Xarxaprod_theme
*/
?>
<aside id="agenda" class="agenda ">
<header>
<h2> <?php echo esc_html__('Agenda', 'xarxaprod'); ?></h2>
</header>
<main class="xarxaprod-agenda">
<?php
// https://developer.wordpress.org/reference/functions/get_posts/
// https://www.advancedcustomfields.com/resources/true-false/
$agenda_query = new WP_Query(
array(
'post_type' => array( 'post' ),
'post_status' => 'publish',
'posts_per_page' => '3',
'tax_query' => array (
array (
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'activitats'
)
)
) );
?>
<?php if ( $agenda_query->have_posts() ) : ?>
<?php while ( $agenda_query->have_posts() ) : $agenda_query->the_post(); ?>
<div class="xarxaprod-card-each xarxaprod-agenda-info-field">
<header class="entry-header">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark" class="">
<?php the_title( '<h3 class="entry-title">', '</h3>' ); ?>
</a>
</header><!-- .entry-header -->
<section class="tipus-activitat agenda-tipus-activitat">
</section>
<aside class="agenda-date agenda-data">
</aside>
</div>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php else : //if no post in query ?>
<p class="no-content"></p>
<?php endif; //end query ?>
</main>
</aside>

View File

@ -15,33 +15,33 @@
<?php the_title(); ?>
</a>
</h3>
<?php if( get_field('os_funder_name') ): //case of ajuts fund ?>
<h6 class="xarxaprod-funder-name"><?php the_field('os_funder_name'); ?></h6>
<?php if( get_field('xxp_funder_name') ): //case of ajuts fund ?>
<h6 class="xarxaprod-funder-name"><?php the_field('xxp_funder_name'); ?></h6>
<?php endif; ?>
<?php if( get_field('os_convoer_name') ): //case of convocatories convo ?>
<h6 class="xarxaprod-convoer-name"><?php the_field('os_convoer_name'); ?></h6>
<?php if( get_field('xxp_convoer_name') ): //case of convocatories convo ?>
<h6 class="xarxaprod-convoer-name"><?php the_field('xxp_convoer_name'); ?></h6>
<?php endif; ?>
<section class="excerpt post-excerpt">
<?php the_excerpt() ?>
</section>
<aside>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_target') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_source') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_field') ); ?>
<?php if( get_field('os_fund_apply_begin') || get_field('os_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-os_fund_dates">
<li>del <?php the_field('os_fund_apply_begin'); ?></li>
<li>al <?php the_field('os_fund_apply_end'); ?></li>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_target') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_source') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_field') ); ?>
<?php if( get_field('xxp_fund_apply_begin') || get_field('xxp_fund_apply_end') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li>del <?php the_field('xxp_fund_apply_begin'); ?></li>
<li>al <?php the_field('xxp_fund_apply_end'); ?></li>
</ul>
<?php endif; ?>
<?php if( get_field('os_fund_apply_text') ): ?>
<ul class="xarxaprod-label item-os_fund_dates">
<li class=""><?php the_field('os_fund_apply_text'); ?></li>
<?php if( get_field('xxp_fund_apply_text') ): ?>
<ul class="xarxaprod-label item-xxp_fund_dates">
<li class=""><?php the_field('xxp_fund_apply_text'); ?></li>
</ul>
<?php endif; ?>
<?php if( get_field('os_fund_call') ): ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_fund_call') ); ?>
<?php if( get_field('xxp_fund_call') ): ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_fund_call') ); ?>
<?php endif; ?>
</aside>
<nav class="more-link">

View File

@ -31,7 +31,7 @@
'posts_per_page' => '4',
'meta_query' => array(
array(
'key' => 'os_home_show',
'key' => 'xxp_home_show',
'value'=> '1',
)
)

View File

@ -1,6 +1,6 @@
<?php
/**
* Template part for displaying featured posts or "ajuts" and widgets
* Template part for displaying "convos" and widgets
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
@ -25,14 +25,14 @@
<?php
// https://developer.wordpress.org/reference/functions/get_posts/
// https://www.advancedcustomfields.com/resources/true-false/
$featured_query = new WP_Query(
$convos_query = new WP_Query(
array(
'post_type' => array( 'xarxaprod-convo' ),
'posts_per_page' => '3'
) );
?>
<?php if ( $featured_query->have_posts() ) : ?>
<?php while ( $featured_query->have_posts() ) : $featured_query->the_post(); ?>
<?php if ( $convos_query->have_posts() ) : ?>
<?php while ( $convos_query->have_posts() ) : $convos_query->the_post(); ?>
<?php //get_template_part( 'template-parts/section', 'eachpost' ); ?>
@ -43,23 +43,23 @@
</a>
</header><!-- .entry-header -->
<?php if( get_field('os_convo_apply_begin') || get_field('os_convo_apply_end') ): ?>
<?php if( get_field('xxp_convo_apply_begin') || get_field('xxp_convo_apply_end') ): ?>
<h6>Deadline:
<?php //the_field('os_convo_apply_begin'); ?>
<?php the_field('os_convo_apply_end'); ?>
<?php //the_field('xxp_convo_apply_begin'); ?>
<?php the_field('xxp_convo_apply_end'); ?>
</h6>
<?php endif; ?>
<?php if( get_field('os_convo_apply_text') ): ?>
<p class="item-os_convo_apply_text"><?php the_field('os_convo_apply_text'); ?></p>
<?php if( get_field('xxp_convo_apply_text') ): ?>
<p class="item-xxp_convo_apply_text"><?php the_field('xxp_convo_apply_text'); ?></p>
<?php endif; ?>
<section class="excerpt post-excerpt">
<?php the_excerpt() ?>
</section>
<aside class="convo-sector convo-field">
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'os_convo_field') ); ?>
<?php get_template_part( 'template-parts/section', 'list-checkbox', array('iterate_field' => 'xxp_convo_field') ); ?>
</aside>
<nav class="more-link">