I am using the following loop on index.php
.
The current viewed page would be one of the link in the loop.
How to make sure it is marked as current?
<ul id="questions" class="subpage">
<?php
$index_query = new WP_Query( array( 'post_type' => 'faq', 'orderby' => 'modified', 'posts_per_page' => '-1', 'order' => 'DESC' ) );
while ( $index_query->have_posts() ) : $index_query->the_post();
?>
<li><a href="<?php the_permalink(); ?>"><?php echo get_field('short_version'); ?> »</a></li>
<?php endwhile; ?>
</ul>
get_field()
is a function from Advanced Custom Fields and has the following format:
get_field($field_name, $post_id);
get_field()
? That's no default WP template tag.