Menu Problem
-
Hey,
I have this menu that I have managed to piece together with parts I found over the web but now I want to combine it with something else.
<?php $count = 1; if (have_posts()) : while(have_posts()): the_post(); ?> <?php echo $count; ?> //menu gets generated here in the form of 1 2 3 4 etc <?php $count++; endwhile; endif; ?>;Now I want to link each this so that each post id is linked to itself by this link
<a href="#" onclick="scrollToEntry("post id number goes here)">I tried to merge the two and it’s semi-successful but it only links to the first ID. The other links don’t work. Can someone help me? Below is the one I tried to merge… Any suggestions?
<?php $count = 1; if (have_posts()) : while(have_posts()): the_post(); ?> <?php echo $count; ?><a href="#" onclick="scrollToEntry(<?the_ID(); ?>)"> //menu gets generated here in the form of 1 2 3 4 etc </a><?php $count++; endwhile; endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Menu Problem’ is closed to new replies.