• Resolved wexy

    (@wexy)


    I have a problem with is_paged (); on index.php and archive.php. I use this code to control the display of the part with page navigation.

    <?php if (is_paged ()) { ?>
    <div class=”navigation_in”>
    <div style=”float:left”><?php posts_nav_link(”,”,’« Previous Entries’) ?></div>
    <div style=”float:right”><?php posts_nav_link(”,’Next Entries »’,”) ?></div>
    </div>
    <?php } ?>

    But is_paged (); just doesn’t return any value.. I’m using 1.5.1.3. Can anyone help?
    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • is_paged() only will give value if the page is a Page … note the cap “P” …

    is_paged() will only give value if you are on a subpage of the archives or main page…

    Thread Starter wexy

    (@wexy)

    Codex says: “is_paged(): When the page being displayed is “paged”. This refers to an archive or the main page being split up over several pages…”

    Thread Starter wexy

    (@wexy)

    Well … index.php is main page right? ??

    yeah, but you’d need to be on a page 2+ of index.php. I should’ve said “subpage of the archives or subpage of main page”.
    At least that’s how it works for me

    Hmm, never used this one, but I thought it’s for a Post with several pages (the one using that <!--nextpage--> or some sort)
    You just have to try to find out, I guess.

    Thread Starter wexy

    (@wexy)

    Ok I understand now, is there another way to control the display of this navigation links, if I leave them and there are no previous or next entries it leaves a nice anoying gap ?? ?

    Thread Starter wexy

    (@wexy)

    @alphaoide: The Codex says it’s not for that.. it says: “When the page being displayed is “paged”. This refers to an archive or the main page being split up over several pages. This does not refer to a Post or Page whose content has been divided into pages using the <!–nextpage–> QuickTag.”

    oh pardon me. i saw wrongly. ?? its past bed-time…

    Thread Starter wexy

    (@wexy)

    Solved the problem, found this plugin https://www.lesterchan.net/portfolio/programming.php and it works nicely, just fixed some formating errors.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘is_paged (); on index.php not working?’ is closed to new replies.