';
postHtml += '
';
postHtml += '
';
// Verificar si hay campo author ingresado y mostrarlo
if (post?.acf?.author) {
postHtml += '
Escrito por ' + post?.acf?.author + '
';
}
postHtml += '
';
postHtml += '
';
// Agregar el HTML al array
htmlArray.push(postHtml);
}
// Unir el array en una cadena de HTML
const finalHtml = htmlArray.join('');
// Agregar el HTML al final del contenedor
document.querySelector('.lacnic-grid-columns').innerHTML = finalHtml;
} catch (error) {
console.error('Error al obtener datos:', error);
} finally {
// Ocultar el spinner después de cargar los datos o en caso de error
hideLoading();
// Agregar el elemento en el mismo lugar
const accessNews = document.querySelector('.access_news');
accessNews.innerHTML = '
Notas [+]';
}
});