2024-02-23 17:15:07 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2024-03-12 20:23:55 +01:00
|
|
|
* Template part for displaying associat post type
|
2024-02-23 17:15:07 +01:00
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
|
|
|
*
|
|
|
|
* @package Xarxaprod_theme
|
|
|
|
*/
|
|
|
|
|
|
|
|
?>
|
2024-02-25 14:32:02 +01:00
|
|
|
<!-- template-parts content-xarxaprod-associat-php -->
|
2024-02-23 17:15:07 +01:00
|
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
|
|
|
|
|
|
|
<header class="entry-header">
|
|
|
|
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
|
|
|
</header><!-- .entry-header -->
|
|
|
|
|
|
|
|
<main class="entry-content">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
the_content(
|
|
|
|
sprintf(
|
|
|
|
wp_kses(
|
|
|
|
/* translators: %s: Name of current post. Only visible to screen readers */
|
2024-04-08 21:48:02 +02:00
|
|
|
__( 'Continua llegin<span class="screen-reader-text"> "%s"</span>', 'xarxaprod' ),
|
2024-02-23 17:15:07 +01:00
|
|
|
array(
|
|
|
|
'span' => array(
|
|
|
|
'class' => array(),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
wp_kses_post( get_the_title() )
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
wp_link_pages(
|
|
|
|
array(
|
|
|
|
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'xarxaprod' ),
|
|
|
|
'after' => '</div>',
|
|
|
|
)
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
</main><!-- .entry-content -->
|
2024-03-12 20:23:55 +01:00
|
|
|
<section class="xarxaprod-associat-info">
|
|
|
|
<section class="xarxaprod-associat-contact">
|
2024-03-31 19:45:28 +02:00
|
|
|
<dt> </dt>
|
2024-03-12 20:23:55 +01:00
|
|
|
<ul class="xarxaprod-associat-contact-fields">
|
|
|
|
<?php if( get_field('xxp_associat_address') ): ?>
|
|
|
|
<li class="xarxaprod-associat-address">
|
2024-03-31 19:45:28 +02:00
|
|
|
<h6>Adreça:</h6>
|
2024-04-19 10:59:46 +02:00
|
|
|
<p><?php echo wp_kses_post( get_field('xxp_associat_address') ); ?></p>
|
2024-03-12 20:23:55 +01:00
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php if( get_field('xxp_associat_mail') ): ?>
|
|
|
|
<li class="xarxaprod-associat-mail">
|
2024-03-31 19:45:28 +02:00
|
|
|
<h6>Eail:</h6>
|
2024-03-12 20:23:55 +01:00
|
|
|
<p><a href="mailto:<?php the_field('xxp_associat_mail'); ?>"><?php the_field('xxp_associat_mail'); ?></a></p>
|
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php if( get_field('xxp_associat_web') ): ?>
|
|
|
|
<li class="xarxaprod-associat-web">
|
2024-03-31 19:45:28 +02:00
|
|
|
<h6>Web:</h6>
|
2024-03-12 20:23:55 +01:00
|
|
|
<p><a href="<?php the_field('xxp_associat_web'); ?>" class=""><?php the_field('xxp_associat_web') ;?></a></p>
|
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php if( get_field('xxp_associat_tel') ): ?>
|
|
|
|
<li class="xarxaprod-associat-tel">
|
2024-03-31 19:45:28 +02:00
|
|
|
<h6>Telèfon:</h6>
|
2024-04-18 20:35:10 +02:00
|
|
|
<p><a href="tel:<?php the_field('xxp_associat_tel'); ?>"><?php the_field('xxp_associat_tel'); ?></a></p>
|
|
|
|
|
2024-03-12 20:23:55 +01:00
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
2024-03-31 19:45:28 +02:00
|
|
|
|
2024-04-18 20:35:10 +02:00
|
|
|
<?php if( have_rows('xxp_asocciat_social_networks') ): ?>
|
|
|
|
<li class="xarxaprod-associat-social-networks">
|
|
|
|
<h6>Xarxes:</h6>
|
|
|
|
<ul class="xarxaprod-associat-social-links">
|
|
|
|
<?php while( have_rows('xxp_asocciat_social_networks') ): the_row(); ?>
|
|
|
|
<li>
|
|
|
|
<?php $eachlink=get_sub_field('xxp_associat_link_social'); ?>
|
2024-04-19 10:59:46 +02:00
|
|
|
<a href="<?php echo esc_attr($eachlink);?>" title="<?php echo esc_attr($eachlink);?>" target="_blank"><?php echo esc_attr($eachlink);?></a>
|
2024-04-18 20:35:10 +02:00
|
|
|
</li>
|
|
|
|
<?php endwhile; //end while has rows associat social networks ?>
|
|
|
|
</ul>
|
2024-03-31 19:45:28 +02:00
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
2024-03-12 20:23:55 +01:00
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="xarxaprod-associat-services">
|
|
|
|
<dt>Serveis</dt>
|
2024-03-14 11:36:43 +01:00
|
|
|
<?php get_template_part(
|
|
|
|
'template-parts/section',
|
|
|
|
'list-checkbox',
|
|
|
|
array('iterate_field' => 'xxp_associat_service')
|
|
|
|
); ?>
|
2024-03-12 20:23:55 +01:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="xarxaprod-associat-logo">
|
|
|
|
<?php if( get_field('xxp_associat_logo') ): ?>
|
|
|
|
<figure class="xarxaprod-associat-logo">
|
|
|
|
<img class="" src="<?php the_field('xxp_associat_logo'); ?>" />
|
|
|
|
</figure>
|
|
|
|
<?php endif; ?>
|
|
|
|
</section>
|
|
|
|
</section>
|
2024-02-23 17:15:07 +01:00
|
|
|
|
2024-04-01 11:05:33 +02:00
|
|
|
<?php if( have_rows('xxp_associat_gallery_images') ){ ?>
|
2024-04-01 18:15:52 +02:00
|
|
|
<section class="xarxaprod-associat-gallery-images">
|
2024-04-01 11:05:33 +02:00
|
|
|
<nav class="xarxaprod-associat-slides-nav">
|
|
|
|
<?php while( have_rows('xxp_associat_gallery_images') ): the_row(); ?>
|
|
|
|
<?php $image=get_sub_field('xxp_associat_image'); ?>
|
|
|
|
<a href="#<?php echo acf_esc_html( $image['filename'] );?>">
|
|
|
|
<?php echo wp_get_attachment_image( $image['ID'], 'thumbnail' ); ?>
|
|
|
|
</a>
|
|
|
|
<?php endwhile; //end while has rows ?>
|
|
|
|
</nav>
|
|
|
|
<ul class="xarxaprod-associat-slides">
|
|
|
|
<?php while( have_rows('xxp_associat_gallery_images') ): the_row(); ?>
|
|
|
|
<?php $image=get_sub_field('xxp_associat_image'); ?>
|
|
|
|
<li id="<?php echo acf_esc_html( $image['filename'] );?>" class="xarxaprod-associat-image">
|
|
|
|
<?php //print_r( $image ); //echo the whole array ?>
|
|
|
|
<?php //print_r( $image['ID'] ); // echo one fiels of the array?>
|
|
|
|
<?php echo wp_get_attachment_image( $image['ID'], 'full' ); ?>
|
|
|
|
<p class="caption"><?php //echo acf_esc_html( $image['caption'] );?></p>
|
|
|
|
</li>
|
|
|
|
<?php endwhile; //end while has rows ?>
|
|
|
|
</ul>
|
|
|
|
</section>
|
2024-04-01 18:15:52 +02:00
|
|
|
<?php }; //end if xxp_associat_gallery_images ?>
|
|
|
|
|
2024-03-12 20:23:55 +01:00
|
|
|
<section class="xarxaprod-associat-convos">
|
|
|
|
<?php get_template_part( 'template-parts/section', 'last-convos' ); ?>
|
|
|
|
</section>
|
2024-02-23 17:15:07 +01:00
|
|
|
|
2024-03-11 08:48:54 +01:00
|
|
|
<section class="xarxaprod-associat-location">
|
2024-03-10 19:11:20 +01:00
|
|
|
<?php if( get_field('xxp_associat_osm_map') ): ?>
|
2024-03-12 20:23:55 +01:00
|
|
|
<div class="xarxaprod-associat-osm-map">
|
2024-02-24 09:50:04 +01:00
|
|
|
<h6 class="">Mapa:</h6>
|
2024-03-28 22:52:32 +01:00
|
|
|
<figure class="xarxaprod-associats-map">
|
2024-04-01 11:05:33 +02:00
|
|
|
<?php
|
|
|
|
xarxaprod_show_leaflet_map(); //defined in pluggin
|
|
|
|
xarxaprod_show_leaflet_associat_blob(); //defined in pluggin
|
2024-03-28 22:52:32 +01:00
|
|
|
?>
|
|
|
|
<?php //the_field('xxp_associat_osm_map'); ?>
|
|
|
|
</figure>
|
2024-02-24 09:50:04 +01:00
|
|
|
</div>
|
2024-03-13 00:23:21 +01:00
|
|
|
<?php endif; ?>
|
|
|
|
<?php if( get_field('xxp_associat_osm_link') ): ?>
|
|
|
|
<div class="xarxaprod-associat-osm-link">
|
2024-04-08 21:48:02 +02:00
|
|
|
<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>
|
2024-03-13 00:23:21 +01:00
|
|
|
</div>
|
2024-02-24 09:50:04 +01:00
|
|
|
<?php endif; ?>
|
2024-02-23 17:15:07 +01:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<footer class="entry-footer">
|
|
|
|
<?php xarxaprod_entry_footer(); ?>
|
|
|
|
</footer><!-- .entry-footer -->
|
|
|
|
</article><!-- #post-<?php the_ID(); ?> -->
|