Highlight Current Page in WordPress
-
Hi,
I’m designing a portfolio-website (https://gabirocha.com) which has a collapsible menu showing posts inside categories,
I created the menus using the get_posts function like follows:
<?php $args = array( 'category' => 3, 'numberposts' => 100, 'order' => 'ASC' ); $cat3 = get_posts( $args ); foreach( $cat3 as $post ) : ?> <li> <a>"> <?php the_title(); ?> </a> </li> <?php endforeach; ?>
Now I want to highlight the current post, but I couldn’t find any documentation on doing this besides using tags like wp_nav_menu
Is it possible to do it?
Thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Highlight Current Page in WordPress’ is closed to new replies.