Home › Forums › General Issues › ACF text area link problem › Reply To: ACF text area link problem
<div class="content-inner">
is upper, that is not the problem, the code that loops is the <a>
tag that contains all the elements inside.
Here you can see the full code:
<div class="content-full home-ct">
<div class="content-inner">
<?php
$args = array(
'post_type' => 'post',
'category' => 43, 44,
'posts_per_page'=> -1,
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post();
?>
<a href='<?php echo get_permalink($post->ID); ?>' >
<div class="post-container">
<div class="post-inner">
<div class="post-img">
<?php if ( has_post_thumbnail() ) : ?><?php the_post_thumbnail('full'); ?><?php endif; ?>
<div class="post-info-container">
<div class="post-inner-info home-post-info">
<span class="entry-date-luna"><?php echo date_i18n('F'); ?></span>
<span class="entry-date-zi"><?php echo get_the_date('d'); ?></span>
<h4><?php the_title(); ?></h4>
<p><?php the_field( 'short_description' ); ?></p>
</div>
<div class="post-cat-list">
<?php $category_detail=get_the_category($post->ID); ?>
<ul>
<?php foreach($category_detail as $cd){ ?>
<?php
if($cd->term_id == 43 || $cd->term_id == 44){ echo ''; } else { echo '<li>'.$cd->cat_name.'</li>'; };
?>
<?php }?>
</ul>
</div>
</div>
</div>
</div>
</div>
</a>
<?php
endwhile;
wp_reset_postdata();
endif;
?>
</div>
</div>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.