Support » Fixing WordPress » Post_ID issue with menu

  • Hey guys,

    I’m having menu issues and need a little help. My links look like this.

    <a href="#" onclick="scrollToEntry(1)">1</a>

    "(1)= div id or post ID"

    I only have 4 posts per page so I would like to keep the navigation at numbers 1-4 but I would like to repurpose the link so that every post you’re viewing changes dynamically to the next number(example: once i past four posts, the fifth post would goto page 2 and link directly to id=1 instead of 4. I can scroll directly to a post_ID but the problem with that is that once the posts get updated, that post doesn’t fall under the same navigation number. I have to go in manually and change it. Can I do this some other way? Like generating the first four post ids and linking them to the first four links on the page? So when you would view page 2 or 3, they would all follow?

    My scroll funtion looks like this in my script:

    function scrollToEntry(entry) {
    	new Effect.ScrollTo("e"+entry, {offset: -75});
    	return false;

    Then in my actual posts I include a div with an id of e0 or what ever the number might be.

    Sorry if my explanation is rough.

    Any help would be greatly appreciated.

  • The topic ‘Post_ID issue with menu’ is closed to new replies.