• Resolved izvarinskij

    (@izvarinskij)


    Code of my pagination is:

    <div id="pagination">
    	<ul>
    		<li class="left"><?php previous_posts_link('&larr; Newer'); ?></li>
    		<li class="pages">
    			<span><?php echo $glob_current_page; ?>?/?<?php echo $wp_query->max_num_pages; ?></span>
    		</li>
    		<li class="right"><?php next_posts_link('Older &rarr;'); ?></li>
    	</ul>
    </div>

    How to add #pagination in href to these links?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Short answer: you can’t.

    Why do you need to add an id?
    (And incidentally, ids should be unique, so you shouldn’t be adding the same id to two links on a page)

    Thread Starter izvarinskij

    (@izvarinskij)

    I mean, when user press next or previous page link, it should jump to #pagination instead of top of page.

    Currently resolved that problem with jQuery.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add anchor link inside next/previous page link?’ is closed to new replies.