Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

229
Visualizações
Filter WordPress posts by custom taxonomy term with AJAX

Please advise....

I create filter taxonomy using this tutorial: https://www.bobz.co/blog/demo-filter-wordpress-posts-custom-taxonomy-term-ajax/

It is echoing all my codes but when I click to certain tag it stop showing me images only.

I am using ACF Gallery code for images in template.

<?php 
$images = get_field('gallery');
if( $images ): ?>
    <ul>
        <?php foreach( $images as $image ): ?>
            <li>
                <a href="<?php echo $image['url']; ?>">
                     <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
                </a>
                <p><?php echo $image['caption']; ?></p>
            </li>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>

I check ajax filter post file and try to edit code but still fails to do so can you please help me out with it.

I want gallery to be display with certain posts when I click on "TAGS"

    $output  = '<h2><a href="'.get_permalink().'">'. get_the_title() . '</a></h2>';
    $output .= get_the_excerpt();


    $result = 'success';

  endwhile; else:
    $output = '<h2>No posts found</h2>';
    $result = 'fail';
  endif;
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

There is not a way we can say whats happening unless seeing it.

Additionally, if you want get the ACF fields from the current page then you must pass the post id. So, it might help you by guessing but not debugging your problem.

$images = get_field('gallery', $post_id);

$post_id should be the id of that particular post you want to show.

Hope this works as guessing your problem for now.

If you give us more details we can see and inspect the problem more easily.

Thanks

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda