From 1ad21c1b08c2804b4178969eddfd6d315c4cd607 Mon Sep 17 00:00:00 2001 From: Josep Piguillem Date: Fri, 25 Sep 2026 10:30:53 +0200 Subject: [PATCH] =?UTF-8?q?Finales=20felices=20(con=20revisi=C3=B3n)=20y?= =?UTF-8?q?=20apadrinamiento,=20preparados=20y=20ocultos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Formulario [ga_final_feliz]: las familias envían texto y foto (solo imágenes reales ≤5 MB, límite de envíos, consentimiento de publicación). Queda pendiente hasta que el equipo la publica; aviso por correo y contador en el menú. - Sección «Finales felices»: historias aprobadas o, si no hay, los adoptados. - Casilla «Busca padrino o madrina», sección «Apadrina» y motivo de contacto (sin pagos). - Páginas «Finales felices / Amaiera zoriontsuak» creadas como borrador. - API: profile.sponsorable. Co-Authored-By: Claude Opus 5.5 --- docker/content/es/finales-felices.html | 7 + docker/content/eu/amaiera-zoriontsuak.html | 7 + docker/setup-content.php | 18 +- wp-content/mu-plugins/gure-ametsa-core.php | 1 + wp-content/mu-plugins/gure-ametsa/animals.php | 12 +- wp-content/mu-plugins/gure-ametsa/api.php | 5 + wp-content/mu-plugins/gure-ametsa/forms.php | 1 + wp-content/mu-plugins/gure-ametsa/stories.php | 175 ++++++++++++++++++ .../themes/gure-ametsa/inc/registry.php | 17 +- wp-content/themes/gure-ametsa/style.css | 9 + .../template-parts/home/sponsor.php | 15 ++ .../template-parts/home/stories.php | 49 +++-- 12 files changed, 293 insertions(+), 23 deletions(-) create mode 100644 docker/content/es/finales-felices.html create mode 100644 docker/content/eu/amaiera-zoriontsuak.html create mode 100644 wp-content/mu-plugins/gure-ametsa/stories.php create mode 100644 wp-content/themes/gure-ametsa/template-parts/home/sponsor.php diff --git a/docker/content/es/finales-felices.html b/docker/content/es/finales-felices.html new file mode 100644 index 0000000..63c37a4 --- /dev/null +++ b/docker/content/es/finales-felices.html @@ -0,0 +1,7 @@ + +

¿Adoptaste a uno de nuestros animales? Nos encantará saber cómo está. Envíanos unas líneas y una foto: lo revisaremos antes de publicarlo.

+ + + +[ga_final_feliz] + diff --git a/docker/content/eu/amaiera-zoriontsuak.html b/docker/content/eu/amaiera-zoriontsuak.html new file mode 100644 index 0000000..ea67fba --- /dev/null +++ b/docker/content/eu/amaiera-zoriontsuak.html @@ -0,0 +1,7 @@ + +

Gure animalietako bat adoptatu zenuen? Asko gustatuko litzaiguke nola dagoen jakitea. Bidali iezaguzu lerro batzuk eta argazki bat: argitaratu aurretik berrikusiko dugu.

+ + + +[ga_final_feliz] + diff --git a/docker/setup-content.php b/docker/setup-content.php index 762b106..3a46b35 100644 --- a/docker/setup-content.php +++ b/docker/setup-content.php @@ -79,7 +79,7 @@ function ga_setup_untouched( WP_Post $post ) { return $post->post_modified_gmt === $post->post_date_gmt; } -function ga_setup_page( $slug, $title, $file, $lang ) { +function ga_setup_page( $slug, $title, $file, $lang, $status = 'publish' ) { $content = file_exists( $file ) ? file_get_contents( $file ) : ''; $page = get_page_by_path( $slug, OBJECT, 'page' ); @@ -95,7 +95,7 @@ function ga_setup_page( $slug, $title, $file, $lang ) { } else { $id = wp_insert_post( array( 'post_type' => 'page', - 'post_status' => 'publish', + 'post_status' => $status, 'post_title' => $title, 'post_name' => $slug, 'post_content' => $content, @@ -147,6 +147,20 @@ foreach ( array( 'hotel', 'hotela' ) as $slug ) { } } +// Páginas preparadas pero sin publicar: el equipo las publica cuando quiera. +$drafts = array( 'finales-felices' => array( 'Finales felices', 'amaiera-zoriontsuak', 'Amaiera zoriontsuak' ) ); +foreach ( $drafts as $slug => [ $title_es, $slug_eu, $title_eu ] ) { + $exists = get_posts( array( 'post_type' => 'page', 'name' => $slug, 'post_status' => 'any', 'numberposts' => 1, 'lang' => '' ) ); + if ( $exists ) { + continue; + } + $draft_ids = array( 'es' => ga_setup_page( $slug, $title_es, "$src/es/$slug.html", 'es', 'draft' ) ); + if ( $pll ) { + $draft_ids['eu'] = ga_setup_page( $slug_eu, $title_eu, "$src/eu/$slug_eu.html", 'eu', 'draft' ); + pll_save_post_translations( $draft_ids ); + } +} + update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', $ids['inicio']['es'] ); update_option( 'wp_page_for_privacy_policy', $ids['politica-de-privacidad']['es'] ); diff --git a/wp-content/mu-plugins/gure-ametsa-core.php b/wp-content/mu-plugins/gure-ametsa-core.php index b1f9ba8..299986b 100644 --- a/wp-content/mu-plugins/gure-ametsa-core.php +++ b/wp-content/mu-plugins/gure-ametsa-core.php @@ -15,3 +15,4 @@ require_once __DIR__ . '/gure-ametsa/api.php'; require_once __DIR__ . '/gure-ametsa/admin.php'; require_once __DIR__ . '/gure-ametsa/share.php'; require_once __DIR__ . '/gure-ametsa/seo.php'; +require_once __DIR__ . '/gure-ametsa/stories.php'; diff --git a/wp-content/mu-plugins/gure-ametsa/animals.php b/wp-content/mu-plugins/gure-ametsa/animals.php index 745a083..0c14085 100644 --- a/wp-content/mu-plugins/gure-ametsa/animals.php +++ b/wp-content/mu-plugins/gure-ametsa/animals.php @@ -103,6 +103,7 @@ function ga_fields() { 'adoptado' => ga__( 'Adoptado', 'Adoptatuta' ), ), 'help' => 'Los adoptados salen solos del listado.' ), 'destacado' => array( 'shared' => true, 'label' => ga__( 'Destacado', 'Nabarmendua' ), 'type' => 'checkbox', 'help' => 'Aparece en la portada. Útil para quien lleva más tiempo esperando o necesita un hogar especial.' ), + 'apadrinable' => array( 'shared' => true, 'label' => ga__( 'Busca padrino o madrina', 'Aitabitxi edo amabitxi bila' ), 'type' => 'checkbox', 'help' => 'Aparece en la sección «Apadrina» (si está activada en Personalizar).' ), 'sexo' => array( 'shared' => true, 'label' => ga__( 'Sexo', 'Sexua' ), 'type' => 'select', 'options' => array( 'macho' => ga__( 'Macho', 'Arra' ), 'hembra' => ga__( 'Hembra', 'Emea' ), @@ -434,7 +435,7 @@ add_action( 'pre_get_posts', function ( $q ) { * @param array $args numero, especie (slugs), estado (lista o 'adoptado'), destacados (bool). */ function ga_query_animals( $args = array() ) { - $args = wp_parse_args( $args, array( 'numero' => 6, 'especie' => '', 'estado' => '', 'destacados' => false ) ); + $args = wp_parse_args( $args, array( 'numero' => 6, 'especie' => '', 'estado' => '', 'destacados' => false, 'apadrinables' => false ) ); $query = array( 'post_type' => 'animal', 'posts_per_page' => (int) $args['numero'], @@ -457,6 +458,9 @@ function ga_query_animals( $args = array() ) { if ( $args['destacados'] ) { $meta[] = array( 'key' => '_ga_destacado', 'value' => '1' ); } + if ( $args['apadrinables'] ) { + $meta[] = array( 'key' => '_ga_apadrinable', 'value' => '1' ); + } $query['meta_query'] = $meta; $q = new WP_Query( $query ); @@ -472,8 +476,10 @@ function ga_query_animals( $args = array() ) { /* [ga_animales numero="6" especie="perro" destacados="1" vista="carrusel"] */ add_shortcode( 'ga_animales', function ( $atts ) { - $atts = shortcode_atts( array( 'numero' => 6, 'especie' => '', 'estado' => '', 'destacados' => '', 'vista' => 'rejilla' ), $atts, 'ga_animales' ); - $atts['destacados'] = in_array( $atts['destacados'], array( '1', 'si', 'true' ), true ); + $atts = shortcode_atts( array( 'numero' => 6, 'especie' => '', 'estado' => '', 'destacados' => '', 'apadrinables' => '', 'vista' => 'rejilla' ), $atts, 'ga_animales' ); + foreach ( array( 'destacados', 'apadrinables' ) as $flag ) { + $atts[ $flag ] = in_array( $atts[ $flag ], array( '1', 'si', 'true' ), true ); + } $q = ga_query_animals( $atts ); ob_start(); if ( $q->have_posts() ) { diff --git a/wp-content/mu-plugins/gure-ametsa/api.php b/wp-content/mu-plugins/gure-ametsa/api.php index 75d0388..df2abe3 100644 --- a/wp-content/mu-plugins/gure-ametsa/api.php +++ b/wp-content/mu-plugins/gure-ametsa/api.php @@ -40,6 +40,7 @@ function ga_api_map() { return array( 'status' => 'estado', 'featured' => 'destacado', + 'sponsorable' => 'apadrinable', 'sex' => 'sexo', 'birthDate' => 'nacimiento', 'age' => 'edad', @@ -73,6 +74,7 @@ function ga_animal_api_data( $post_id ) { $data = array( 'status' => ga_api_to( 'estado', ga_status( $post_id ) ), 'featured' => (bool) ga_get( $post_id, 'destacado' ), + 'sponsorable' => (bool) ga_get( $post_id, 'apadrinable' ), 'sex' => ga_api_to( 'sexo', ga_get( $post_id, 'sexo' ) ), 'birthDate' => $text( 'nacimiento' ), 'age' => '' === ga_get( $post_id, 'edad' ) ? null : (float) ga_get( $post_id, 'edad' ), @@ -116,6 +118,7 @@ function ga_animal_api_update( array $profile, $post_id ) { } break; case 'featured': + case 'sponsorable': $value = $raw ? '1' : ''; break; case 'age': @@ -157,6 +160,7 @@ function ga_animal_api_schema() { 'properties' => array( 'status' => array( 'type' => 'string', 'enum' => array_values( ga_api_enums()['estado'] ), 'description' => 'Adopted animals are hidden from public listings.' ), 'featured' => array( 'type' => 'boolean', 'description' => 'Shown on the home page.' ), + 'sponsorable' => array( 'type' => 'boolean', 'description' => 'Looking for a sponsor.' ), 'sex' => $enum( 'sexo' ), 'birthDate' => $string_or_null + array( 'format' => 'date' ), 'age' => array( 'type' => array( 'number', 'null' ), 'description' => 'Approximate age, used when birthDate is unknown.' ), @@ -211,6 +215,7 @@ add_action( 'graphql_register_types', function () { 'fields' => array( 'status' => array( 'type' => 'AnimalStatusEnum' ), 'featured' => array( 'type' => 'Boolean' ), + 'sponsorable' => array( 'type' => 'Boolean' ), 'sex' => array( 'type' => 'AnimalSexEnum' ), 'birthDate' => array( 'type' => 'String' ), 'age' => array( 'type' => 'Float' ), diff --git a/wp-content/mu-plugins/gure-ametsa/forms.php b/wp-content/mu-plugins/gure-ametsa/forms.php index 12d370a..e187a60 100644 --- a/wp-content/mu-plugins/gure-ametsa/forms.php +++ b/wp-content/mu-plugins/gure-ametsa/forms.php @@ -13,6 +13,7 @@ function ga_contact_reasons() { 'acogida' => ga__( 'Casa de acogida', 'Harrera-etxea' ), 'voluntario' => ga__( 'Voluntariado', 'Boluntariotza' ), 'material' => ga__( 'Ayuda material', 'Laguntza materiala' ), + 'apadrinar' => ga__( 'Apadrinamiento', 'Apadrinatzea' ), 'otro' => ga__( 'Otro', 'Beste bat' ), ); } diff --git a/wp-content/mu-plugins/gure-ametsa/stories.php b/wp-content/mu-plugins/gure-ametsa/stories.php new file mode 100644 index 0000000..d1ac03c --- /dev/null +++ b/wp-content/mu-plugins/gure-ametsa/stories.php @@ -0,0 +1,175 @@ + array( + 'name' => 'Finales felices', + 'singular_name' => 'Final feliz', + 'add_new_item' => 'Añadir final feliz', + 'edit_item' => 'Revisar final feliz', + 'all_items' => 'Finales felices', + 'not_found' => 'Aún no hay historias', + 'featured_image' => 'Foto', + ), + 'public' => false, + 'show_ui' => true, + 'show_in_menu' => 'edit.php?post_type=animal', + 'supports' => array( 'title', 'editor', 'thumbnail' ), + 'map_meta_cap' => true, + ) ); +} ); + +/* Contador de historias pendientes en el menú */ +add_action( 'admin_menu', function () { + global $submenu; + $pending = (int) wp_count_posts( 'ga_historia' )->pending; + foreach ( $submenu['edit.php?post_type=animal'] ?? array() as $i => $item ) { + if ( 'edit.php?post_type=ga_historia' === $item[2] && $pending ) { + $submenu['edit.php?post_type=animal'][ $i ][0] .= ' ' . $pending . ''; + } + } +}, 99 ); + +/** Historias publicadas en el idioma actual (o en cualquiera si no hay). */ +function ga_query_stories( $number = 6 ) { + return new WP_Query( array( + 'post_type' => 'ga_historia', + 'post_status' => 'publish', + 'posts_per_page' => $number, + 'no_found_rows' => true, + ) ); +} + +/* ------------------------------------------------------------------------- + * [ga_final_feliz] formulario para que las familias envíen su historia + * ---------------------------------------------------------------------- */ + +add_shortcode( 'ga_final_feliz', function () { + $status = sanitize_key( $_GET['historia'] ?? '' ); + $privacy = ga_page_url( 'politica-de-privacidad' ); + ob_start(); + if ( 'ok' === $status ) { + echo '
' . esc_html( ga__( '¡Gracias por compartirlo! Lo revisaremos antes de publicarlo.', 'Eskerrik asko partekatzeagatik! Argitaratu aurretik berrikusiko dugu.' ) ) . '
'; + return ob_get_clean(); + } + if ( 'error' === $status ) { + echo ''; + } + ?> +
+ + + + + +
+ + +
+ + + + + + +
+ = 3 ) { + $go( 'error' ); + } + set_transient( $key, $count + 1, HOUR_IN_SECONDS ); + + $animal = sanitize_text_field( wp_unslash( $_POST['animal'] ?? '' ) ); + $familia = sanitize_text_field( wp_unslash( $_POST['familia'] ?? '' ) ); + $email = sanitize_email( wp_unslash( $_POST['email'] ?? '' ) ); + $texto = mb_substr( sanitize_textarea_field( wp_unslash( $_POST['texto'] ?? '' ) ), 0, 800 ); + if ( ! $animal || ! $familia || ! is_email( $email ) || ! $texto || empty( $_POST['publicar'] ) || empty( $_POST['privacidad'] ) ) { + $go( 'error' ); + } + + $story_id = wp_insert_post( array( + 'post_type' => 'ga_historia', + 'post_status' => 'pending', + 'post_title' => $animal, + 'post_content' => $texto, + ) ); + if ( ! $story_id || is_wp_error( $story_id ) ) { + $go( 'error' ); + } + update_post_meta( $story_id, '_ga_familia', $familia ); + update_post_meta( $story_id, '_ga_email', $email ); + update_post_meta( $story_id, '_ga_idioma', 'eu' === ( $_POST['idioma'] ?? '' ) ? 'eu' : 'es' ); + + // Foto: solo imágenes reales de hasta 5 MB. + if ( ! empty( $_FILES['foto']['tmp_name'] ) && UPLOAD_ERR_OK === $_FILES['foto']['error'] ) { + $file = $_FILES['foto']; + $check = wp_check_filetype_and_ext( $file['tmp_name'], $file['name'], array( 'jpg|jpeg' => 'image/jpeg', 'png' => 'image/png', 'webp' => 'image/webp' ) ); + if ( $file['size'] > 5 * MB_IN_BYTES || ! $check['type'] || ! @getimagesize( $file['tmp_name'] ) ) { + wp_delete_post( $story_id, true ); + $go( 'error' ); + } + require_once ABSPATH . 'wp-admin/includes/file.php'; + require_once ABSPATH . 'wp-admin/includes/image.php'; + require_once ABSPATH . 'wp-admin/includes/media.php'; + $attachment = media_handle_upload( 'foto', $story_id, array(), array( 'test_form' => false, 'mimes' => array( 'jpg|jpeg' => 'image/jpeg', 'png' => 'image/png', 'webp' => 'image/webp' ) ) ); + if ( ! is_wp_error( $attachment ) ) { + set_post_thumbnail( $story_id, $attachment ); + } + } + + wp_mail( + ga_contact_email(), + '[Web] Nuevo final feliz por revisar: ' . $animal, + sprintf( "%s ha enviado la historia de %s.\n\nRevísala y publícala aquí: %s", $familia, $animal, admin_url( 'post.php?action=edit&post=' . $story_id ) ) + ); + $go( 'ok' ); +} + +/* En el panel: quién la envió (sin publicar su correo) */ +add_action( 'add_meta_boxes_ga_historia', function () { + add_meta_box( 'ga_historia_info', 'Enviada por', function ( $post ) { + printf( + '

%s
%s
Idioma: %s

Para publicarla pulsa «Publicar». El nombre de la familia se muestra; el correo no.

', + esc_html( get_post_meta( $post->ID, '_ga_familia', true ) ?: '—' ), + esc_html( get_post_meta( $post->ID, '_ga_email', true ) ?: '' ), + esc_html( get_post_meta( $post->ID, '_ga_idioma', true ) ?: 'es' ) + ); + }, 'ga_historia', 'side' ); +} ); diff --git a/wp-content/themes/gure-ametsa/inc/registry.php b/wp-content/themes/gure-ametsa/inc/registry.php index f3d5ece..a3deae4 100644 --- a/wp-content/themes/gure-ametsa/inc/registry.php +++ b/wp-content/themes/gure-ametsa/inc/registry.php @@ -409,11 +409,26 @@ function ga_customizer_registry() { 'eyebrow' => $t( 'Antetítulo', 'Ya están en casa', 'Etxean daude jada' ), 'title' => $t( 'Título', 'Finales felices', 'Amaiera zoriontsuak' ), 'text' => $t( 'Texto', 'Gracias por formar parte de sus segundas oportunidades.', 'Eskerrik asko haien bigarren aukeren parte izateagatik.', 'textarea' ), - 'count' => array( 'type' => 'number', 'label' => 'Número de animales', 'default' => 8, 'min' => 1, 'max' => 24 ), + 'count' => array( 'type' => 'number', 'label' => 'Número de historias o animales', 'default' => 8, 'min' => 1, 'max' => 24 ), 'view' => array( 'type' => 'select', 'label' => 'Presentación', 'default' => 'carrusel', 'choices' => array( 'carrusel' => 'Carrusel (se desliza)', 'rejilla' => 'Rejilla', ) ), + 'button' => $t( 'Botón para enviar historias (vacío = ocultar)', 'Cuéntanos vuestra historia', 'Kontaiguzu zuen istorioa' ), + ), + ), + 'sponsor' => array( + 'panel' => 'ga_home', + 'title' => 'Apadrina', + 'section' => true, + 'hidden' => true, + 'description' => 'Muestra los animales marcados como «Busca padrino o madrina».', + 'fields' => array( + 'eyebrow' => $t( 'Antetítulo', 'Apadrina', 'Apadrinatu' ), + 'title' => $t( 'Título', 'Acompáñales *mientras esperan*', 'Lagun egiozu *itxaroten duten bitartean*' ), + 'text' => $t( 'Texto', 'Algunos llevan mucho tiempo con nosotras. Si no puedes adoptar, puedes apadrinar a uno de ellos. Escríbenos y te contamos cómo.', 'Batzuk denbora luzea daramate gurekin. Ezin baduzu adoptatu, haietako bat apadrinatu dezakezu. Idatzi iezaguzu eta nola kontatuko dizugu.', 'textarea' ), + 'button' => $t( 'Botón', 'Quiero apadrinar', 'Apadrinatu nahi dut' ), + 'count' => array( 'type' => 'number', 'label' => 'Número de animales', 'default' => 4, 'min' => 1, 'max' => 12 ), ), ), 'intake' => array( diff --git a/wp-content/themes/gure-ametsa/style.css b/wp-content/themes/gure-ametsa/style.css index dd0b2d5..5f3c5bb 100644 --- a/wp-content/themes/gure-ametsa/style.css +++ b/wp-content/themes/gure-ametsa/style.css @@ -550,6 +550,15 @@ body { overflow-x: clip; } .ga-animal__photo { position: static; } } +/* Finales felices */ +.ga-story { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ga-line); border-radius: var(--ga-radius); overflow: hidden; } +.ga-story__img { aspect-ratio: 4/3; background: var(--ga-green-soft); } +.ga-story__img img { width: 100%; height: 100%; object-fit: cover; } +.ga-story__body { margin: 0; padding: 18px 20px 20px; font-size: .98rem; flex: 1; display: flex; flex-direction: column; } +.ga-story__body p::before { content: "“"; font: 800 2rem/0 var(--ga-serif); color: var(--ga-red); vertical-align: -.35em; margin-right: 2px; } +.ga-story__body footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--ga-line); color: var(--ga-muted); font-size: .9rem; } +.ga-story__body footer strong { font-family: var(--ga-serif); color: var(--ga-green-dark); } + /* Pestañas Perros / Gatos */ .ga-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; } .ga-tab { padding: 11px 26px; border-radius: 999px; border: 2px solid var(--ga-green); color: var(--ga-green); font-weight: 700; text-decoration: none; font-size: 1.05rem; } diff --git a/wp-content/themes/gure-ametsa/template-parts/home/sponsor.php b/wp-content/themes/gure-ametsa/template-parts/home/sponsor.php new file mode 100644 index 0000000..bbf69d1 --- /dev/null +++ b/wp-content/themes/gure-ametsa/template-parts/home/sponsor.php @@ -0,0 +1,15 @@ +%s', esc_url( add_query_arg( 'motivo', 'apadrinar', ga_page_url( 'contacto' ) ) . '#formulario' ), esc_html( ga_opt( 'sponsor', 'button' ) ) ) + : ''; +?> +
+
+ $button ) ); ?> + +
+
diff --git a/wp-content/themes/gure-ametsa/template-parts/home/stories.php b/wp-content/themes/gure-ametsa/template-parts/home/stories.php index 2426a44..b384d37 100644 --- a/wp-content/themes/gure-ametsa/template-parts/home/stories.php +++ b/wp-content/themes/gure-ametsa/template-parts/home/stories.php @@ -1,25 +1,40 @@ max( 1, (int) ga_opt( 'stories', 'count' ) ), - 'estado' => 'adoptado', -) ); -if ( ! $adopted->have_posts() ) { +/* + * Finales felices: las historias aprobadas (enviadas por las familias); si aún no hay, + * los últimos animales adoptados. Si no hay nada, la sección no aparece. + */ +$number = max( 1, (int) ga_opt( 'stories', 'count' ) ); +$stories = function_exists( 'ga_query_stories' ) ? ga_query_stories( $number ) : null; +$adopted = ( $stories && $stories->have_posts() ) ? null : ga_query_animals( array( 'numero' => $number, 'estado' => 'adoptado' ) ); +if ( ! ( $stories && $stories->have_posts() ) && ! $adopted->have_posts() ) { return; } +$form_page = get_page_by_path( 'finales-felices' ); +$form_url = $form_page && 'publish' === $form_page->post_status ? ga_page_url( 'finales-felices' ) : ''; +$button = $form_url && ga_opt( 'stories', 'button' ) + ? sprintf( '%s', esc_url( $form_url ), esc_html( ga_opt( 'stories', 'button' ) ) ) + : ''; +$carousel = 'carrusel' === ga_opt( 'stories', 'view' ); ?>
- true ) ); ?> - ' ); - while ( $adopted->have_posts() ) : - $adopted->the_post(); - get_template_part( 'template-parts/animal-card' ); - endwhile; - wp_reset_postdata(); - $carousel ? ga_carousel_close() : print( '
' ); - ?> + $button ) ); ?> + ' ); ?> + have_posts() ) : ?> + have_posts() ) : $stories->the_post(); ?> +
+
+ 'lazy' ) ) : '
' . ga_placeholder_svg() . '
'; ?> +
+
+

+
+
+
+ + + have_posts() ) : $adopted->the_post(); get_template_part( 'template-parts/animal-card' ); endwhile; ?> + + ' ); ?>