Forums

Problems with <!---nextpage--> in static front page (5 posts)

  1. mnogueir
    Member
    Posted 1 year ago #

    Hello there!

    I have a page as my Front Page, which i wanted to paginate with the <!--nextpage--> tag. However, it doesn't work. You can check for yourself here:

    http://www.marionogueira.com

    At the bottom of the page will see that "Page 2" links to:

    http://www.marionogueira.com&page=2

    which is not correct. Shouldn't the "page_id=6" (in my case) be inserted in the URL before the "&page=2"?? If you try "http://www.marionogueira.com?page_id=6&page=2" it works as expected (empty second page, btw).

    Is this a bug?

    Thanks

  2. mnogueir
    Member
    Posted 1 year ago #

    After digging a bit more in the forums, I realized that there may be some limitations on the front page. Could this be the case? SHould I try some different approach?

    If not, can anybody please verify this behaviour ( <!--nextpage--> not working correctly on the static front page, and working in every other page)?

    Thanks

  3. mnogueir
    Member
    Posted 1 year ago #

    Well, I think I found my own answer. Searching the code I found the get_page_link() function, in which:

    if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') )
    		$link = get_option('home');
    	else
    		$link = _get_page_link( $id );

    Reading this I'd say that the link returned, if this is the front page, will be the blog's home, not the link to the page. Therefore, the URL created by <!--nextpage--> will be wrong.

    Again, can anyone confirm this? Is this an expected behaviour?

    Thanks

    Mário

  4. mnogueir
    Member
    Posted 1 year ago #

    Sorry for *bumping*, but I need to know if what I want is doable. I don't like having broken links on my front page...

    Thanks

    Mário

  5. mnogueir
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic