illusiv
Member
Posted 2 years ago #
Hello,
Take a look at my site. You can see a scroller in the footer were you can select a post by clicking on it. I'm looking for the following solution:
After you select a post I want to add a class to a div of the selected post in the scroller to get a active state on it. So you know which post you selected.
Anyone know how to fix this? I really don't know were to start...
Kind Regards,
Melvin
illusiv
Member
Posted 2 years ago #
I know it's something like this:
<?php if ( is_single(???) ) { ?>
<div class="Active" id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div id="post-<?php the_ID(); ?>">
<?php } ?>
But the is_single(???) ID is dynamic. How can I get the ID based on a single post?
Looking forward to solutions!
illusiv
Member
Posted 2 years ago #