Title: Menu Problem
Last modified: August 19, 2016

---

# Menu Problem

 *  Resolved [okasu](https://wordpress.org/support/users/okasu/)
 * (@okasu)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/menu-problem-4/)
 * 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)

 *  [Shane G.](https://wordpress.org/support/users/shane-g-1/)
 * (@shane-g-1)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/menu-problem-4/#post-1433311)
 * Hi,
 * Check with these plugins to manage menu on your blog:
 * [http://wordpress.org/extend/plugins/allwebmenus-wordpress-menu-plugin/](http://wordpress.org/extend/plugins/allwebmenus-wordpress-menu-plugin/)
   
   [http://wordpress.org/extend/plugins/wordpress-navigation-list-plugin-navt/](http://wordpress.org/extend/plugins/wordpress-navigation-list-plugin-navt/)
   [http://wordpress.org/extend/plugins/wordpress-css-drop-down-menu/](http://wordpress.org/extend/plugins/wordpress-css-drop-down-menu/)
 * Thanks,
 * Shane G.
 *  Thread Starter [okasu](https://wordpress.org/support/users/okasu/)
 * (@okasu)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/menu-problem-4/#post-1433346)
 * Hey Shane,
 * Thanks for taking the time to find those plugins for me. Unfortunately, they 
   don’t fit my needs very well.
 * The following script above is almost there, I just need a few minor tweaks to
   have it just right.
 * Does anyone else think they know what I could do?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Menu Problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [okasu](https://wordpress.org/support/users/okasu/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/menu-problem-4/#post-1433346)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
