• I am using wordpress 2.7 and I am trying to add a new page using my plugin. The plugin reads in some data and I want to break the data into multiple pages if it is too many rows. However, it appears that wordpress is just printing the <!–nextpage–> quicktag. It does not display as it believes it to be an html comment. Any ideas how to have wordpress execute the quick tag after my plugin returns the data. If I create a page or post through the editor it creates the next page as expected. link_pages is located in the themes page.php and single.php Any help would be greatly appreciated.

    sample code
    Function myfun(){
    //code to get data
    $new_page = get_option(‘rows_per_page’);
    foreach($data as $item) {
    //code to add a row
    rows= rows +1;
    if ($rows == $new_page){
    \\close table on page
    \\start new page and create new table

    $text = $text .”</table>”;
    $text = $text .”<!–nextpage–>” ;
    $rows = 0;
    $text = $text . “<table><tr><td>”;
    }

    }
    /close last table on last page
    $text = $text .”</table>”;
    }
    return $text;

    It puts the <!–nextpage–> quick tag in the correct location but it is just seen as an html comment. WordPress does not parse the returning text and execute the link_pages function.

The topic ‘next page in source code but not executing’ is closed to new replies.