Web de Gure Ametsa Bi Lagun en WordPress para Dokploy
- Docker Compose (WordPress + MariaDB) listo para Dokploy, con instalación automática por etapas: idiomas, páginas, menús y plugins recomendados. - Web bilingüe castellano / euskera con Polylang. - Tema propio «gure-ametsa»: diseño inspirado en Beargrass Animal Rescue, personalizable desde Apariencia → Personalizar (paletas, tipografías, secciones de portada ordenables) y patrones de bloques propios. - Plugin mu «gure-ametsa-core»: animales en adopción con ficha y filtros, carrusel y formulario de contacto/adopción. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/* Accesos grandes a perros y gatos (inspirado en «Meet our dogs / Meet our cats»). */
|
||||
$tiles = array();
|
||||
foreach ( array( 'dog' => 'perro', 'cat' => 'gato' ) as $key => $slug ) {
|
||||
$term = get_term_by( 'slug', $slug, 'especie' );
|
||||
if ( $term && function_exists( 'pll_get_term' ) ) {
|
||||
$translated = pll_get_term( $term->term_id, ga_lang() );
|
||||
$term = $translated ? get_term( $translated, 'especie' ) : $term;
|
||||
}
|
||||
$tiles[ $key ] = array(
|
||||
'url' => $term && ! is_wp_error( $term ) ? get_term_link( $term ) : get_post_type_archive_link( 'animal' ),
|
||||
'label' => ga_opt( 'species', "{$key}_label" ),
|
||||
'image' => (int) ga_opt( 'species', "{$key}_image" ),
|
||||
);
|
||||
}
|
||||
?>
|
||||
<section class="ga-section ga-species-section">
|
||||
<div class="ga-wrap">
|
||||
<?php if ( ga_opt( 'species', 'title' ) ) : ?>
|
||||
<h2 class="ga-center"><?php ga_opt_e( 'species', 'title' ); ?></h2>
|
||||
<?php endif; ?>
|
||||
<div class="ga-species">
|
||||
<?php foreach ( $tiles as $key => $tile ) : ?>
|
||||
<a class="ga-species__tile ga-species__tile--<?php echo esc_attr( $key ); ?>" href="<?php echo esc_url( $tile['url'] ); ?>">
|
||||
<?php if ( $tile['image'] ) : ?>
|
||||
<?php echo wp_get_attachment_image( $tile['image'], 'large', false, array( 'loading' => 'lazy', 'alt' => '' ) ); ?>
|
||||
<?php else : ?>
|
||||
<span class="ga-species__paw"><?php echo ga_icon( 'paw' ); ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="ga-species__label"><?php echo esc_html( $tile['label'] ); ?> <span aria-hidden="true">→</span></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user