espais associats maps and buttons in search

This commit is contained in:
Jorge vitrubio.net 2024-04-08 21:48:02 +02:00
parent a029f9f615
commit de29d69817
2 changed files with 9 additions and 37 deletions

View File

@ -20,7 +20,7 @@ get_header();
?>
<header class="page-header">
<h1><?php single_term_title( ' ' ); ?></h1>
<h1><?php _e( 'Espais associats', 'xarxaprod' ); //single_term_title(''); ?></h1>
</header>
<aside id="associatsfilter" class="xarxaprod-filter-associats xarxaprod-filtre-associats">
@ -31,46 +31,18 @@ get_header();
<figure id="xarxaprod-associats-map" class="xarxaprod-associats-map">
<?php xarxaprod_show_leaflet_map(); // function defined in the plugin ?>
</figure>
<?php if ( have_posts() ) :?>
<?php
//if ( have_posts() ) :
// while ( have_posts() ) : the_post();
// xarxaprod_show_leaflet_associat_blob(); // function defined in the plugin
// endwhile;
//else :
// get_template_part( 'template-parts/content', 'none' );
while ( have_posts() ) : the_post();
xarxaprod_show_leaflet_associat_blob(); // function defined in the plugin
endwhile;
//endif;
?>
<?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_associat = new WP_Query(
array(
'post_type' => 'xarxaprod-associat',
'order' => 'ASC', //order a b c d ...
'order_by' => 'name', // by name slug
'posts_per_page' => '-1' //all of them
)
);
?>
<?php if ( $the_query_associat->have_posts() ) : ?>
<?php while ( $the_query_associat->have_posts() ) : $the_query_associat->the_post(); ?>
<?php xarxaprod_show_leaflet_associat_blob(); ?>
<?php endwhile;//end of the loop ?>
<?php wp_reset_postdata(); ?>
<?php endif; //end query associat ?>
<?php
// nuvol de nomb sde fabriques
// nuvol de nom de fabriques
echo '<ul class="xarxaprod-label">';
while ( have_posts() ) : the_post();
echo '<li>';
@ -85,7 +57,7 @@ get_header();
endwhile;
echo '</ul>';
?>
<?php endif; //have_posts ?>
</content>
<section id="filteredassociats" class="xarxaprod-filtered-content xarxaprod-filtered-associats xarxaprod-associats-filtrats">
</section>

View File

@ -22,7 +22,7 @@
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'xarxaprod' ),
__( 'Continua llegin<span class="screen-reader-text"> "%s"</span>', 'xarxaprod' ),
array(
'span' => array(
'class' => array(),
@ -143,7 +143,7 @@
<?php endif; ?>
<?php if( get_field('xxp_associat_osm_link') ): ?>
<div class="xarxaprod-associat-osm-link">
<h6 class="">Localizatcio:</h6><p> <a href="<?php the_field('xxp_associat_osm_link'); ?>"><?php the_field('xxp_associat_osm_link'); ?></a></p>
<h6 class="">Localizatcio:</h6><p> <a href="<?php the_field('xxp_associat_osm_link'); ?>" target="_blank" title="Obre openstreetmaps.org"><?php the_field('xxp_associat_osm_link'); ?></a></p>
</div>
<?php endif; ?>
</section>