WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Full Number Pagination

[Resolved] Full Number Pagination

  • I also found a custom function you provided for table reloaded to add full number pagination rather than the back/forward arrows.

    // Datatables Pagination
    	add_filter( 'wp_table_reloaded_js_frontend_parameters', 'wp_table_reloaded_change_pagination_type' );
    	function wp_table_reloaded_change_pagination_type( $parameters ) {
    	    $parameters['pagination_type'] = '"sPaginationType": "full_numbers"';
    	    return $parameters;
    	}

    I tried adjusting this to work with Tablepress but with no luck. Is this possible with Tablepress as well.

    http://wordpress.org/extend/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    @tobiasbg

    Hi,

    yes, this is possible in TablePress as well.
    If you want this for all tables, using some code like that is the best way, indeed:

    // DataTables Pagination
    add_filter( 'tablepress_datatables_parameters', 'tablepress_change_pagination_type', 10, 4 );
    function tablepress_change_pagination_type( $parameters, $table_id, $html_id, $js_options ) {
    	$parameters['pagination_type'] = '"sPaginationType": "full_numbers"';
    	return $parameters;
    }

    That could should go into a small new plugin or into your theme’s “functions.php”.

    If you just want this on a few tables, just enter

    "sPaginationType": "full_numbers"

    into the “Custom Commands” textfield in the “Features of the DataTables JavaScript library” section on the “Edit” screen of these tables.

    Regards,
    Tobias

    Perfect, thanks.

    Plugin Author TobiasBg

    @tobiasbg

    Hi,

    sure, no problem! You are very welcome! Great to hear that this worked so easily! 🙂

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Full Number Pagination’ is closed to new replies.