WordPress.org

Forums

[resolved] Get the page number in paged loop... (4 posts)

  1. SimonJ
    Member
    Posted 5 years ago #

    Hello all!

    Ok, a little question.

    When I browse my categories, or any looped page, the post are "broken" in pages. Nice.

    Are you aware of any method to display the page number you are curently browsing?

    Let's say the url of a category looks like this :

    /category/name-oh-this-category/page/10/

    I would like to get the "page number 10" and display it...

    Thanks!

    S.

  2. Mark / t31os
    Moderator
    Posted 5 years ago #

    echo get_query_var('paged'); assuming one exists for the query would output the page number..

  3. SimonJ
    Member
    Posted 5 years ago #

    Nice! Thanks. It works.

    Cheers

    @+

    S.

  4. Mark / t31os
    Moderator
    Posted 5 years ago #

    You're welcome..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.