• Hi,

    I am trying to set a different effect on my button for “next page” & “previous page” in my navigation when we can’t go foward or backward.

    For exemple, I’m on page 1, the “previous button” gonna get [x] styling and if I’m on page 2, the button gonna get [y] styling.

    Can some one tell me how I could reach it?

    Here is my code for the moment.

    <!-- Navigation -->
    		<div class="left">
    			<?php next_posts_link('<img src="images/btn-next-page.gif" />'); ?>
            </div>
            <div class="right">
                <?php previous_posts_link('<img src="images/btn-prev-page.gif" />'); ?>
            </div>
Viewing 4 replies - 1 through 4 (of 4 total)
  • I would change the code above to this:

    <div class="post-navigation">
        <div class="left"><?php next_posts_link('&laquo; Older Posts') ?></div>
        <div class="right"><?php previous_posts_link('Newer Posts &raquo;') ?></div>
    </div>

    Then style the buttons in the stylesheet with the appropriate images.
    Please note, that with the above code, the previous link won’t show on page 1, because there are no previous posts. I think that’s better for usability.

    Thread Starter Patrice Poliquin

    (@poliquinp)

    Please note, that with the above code, the previous link won’t show on page 1, because there are no previous posts. I think that’s better for usability.

    this is true, but my designer made a different style button when there is no “Previous” or “Next” page.

    We shoudl start a discussion on the revelance of this kind of thing soon ??

    I think it’s silly to have a button where there shouldn’t be any… that’s as annoying as going to the restaurant seeing a steak on the menu and finding out that they are all out of steak.

    Thread Starter Patrice Poliquin

    (@poliquinp)

    This is true.

    But if I come back to the navigation, I used a plugin to be able to get my Previous page & Next page + the Page 1 of X.

    In this plugin I have been able to tweak it a little bit to get my “non-clickable button”…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Navigation styling problem’ is closed to new replies.