I realise that you say that you can’t enable paging of users, but if it’s a case of you don’t know how, you can pass ‘number’ and ‘offset’ in the args array.
In your example to get page 2 of your users, set ‘number’ as ‘5’ and ‘offset’ as ‘5’.
If using those variables is not suitable you can always use a for loop with a count (instead of foreach) and insert a break every 5 iterations eg.
for ($i = 0; $i < count($students); $i++) {
// some code here
if ($i % 5 == 0 && $i != 0 && $i != count($students)) {
// insert page break code here
}
}
Related Posts:
- How to change the page break numbering?
- Pagination for a page created by the shortcode “Product”
- WordPress post pagination continuous [duplicate]
- WordPress post shortcode pagination not working
- Pagination for custom posts loop
- How to set up posts per page on WP
- wp_link_pages shortcode for ‘nextpagelink’
- Content included from pagination
- Pass boolean value in shortcode
- how to show the syntax of a shortcode
- Get first video from the post (both embed and video shortcodes)
- Implement If-ElseIf-Else-EndIf with short codes
- using html as shortcode attribute
- shortcode outputs first before the page content [duplicate]
- Are php template shortcodes ok?
- Extract attribute values from every shortcode in post
- How to make shortcode to hide selection of text from post or page?
- how to get shortcodes to work inside the text of custom fields
- Shortcode attribute value with dash (hyphen)
- Shortcode Displaying Custom Post Types
- Shortcode content does not show in feed discription/excerpt
- How do I create shortcodes for my wordpress themes?
- Execute shortcode only in another shortcode
- Adding shortcode inside Visual Composer raw HTML [closed]
- Shortcode not working inside html input
- Multiple loops on page only show taxonomy name of first loop
- Add attribute to existing Shortcode
- How to link to a alternative page in CSS
- How to handle a shortcode function directly?
- manipulate a plugins shortcode
- How can I get the current user email instead of user ID?
- Shortcodes output in the wrong order
- How to link to a page that has a shortcode?
- Adding short codes from a page’s content on header and hiding the same from page’s content
- Should I cache default WordPress gallery shortcode output?
- Audio and video shortcodes not working properly
- How to load shortcode sooner
- Tinymce list of shortcodes button
- Add page title as a javacript variable to specific posts
- How to create a shortcode for custom page template
- How to add and submit input fields using a shortcode?
- Pass javascript array to shortcode
- Shortcode: display list of created shortcode in popup
- Shortcode return $content vs do_shortcode($content)
- Duplicating Table of Contents for Paginated Post
- Shortcode not working with WordPress updated
- WordPress Shortcode callback function with a plugin
- Problem with multiple shortcode in page template
- Saving post content to database with do_shortcode?
- Is it important to sanitize inputs in a shortcode that will be used in site that only I will post to?
- Wrap Shortcodes and wpautop
- Placing tags on wordpress visual editor using shortcodes
- Shortcode called twice
- Favorite websites with shortened hyperlinks
- Best way to find all shortcodes that come with WordPress
- Using Variables in Shortcodes
- Default Attributes in Shortcode Not Working
- Replacement for gallery_shortcode function not taking all attributes
- Add JS in footer via shortcode?
- Shortcode syntax errors
- Passing variable in nested shortcodes
- Shortcode Always Displays Default Attribute Value
- how can i pass this attribute in this shortcode?
- How do I fit a function inside an opening and closing do_shortcode
- How to make shortcode which returns HTML?
- Add shortcode within the_content()
- How to create a custom shortcode for custom login form?
- Enclosing Shortcode not working in a Template
- Set redirect for need login
- pass complex json as shortcode parameter
- Image Caption Shortcode Broken upon update
- Shortcode not working in CPT taxonomy
- How to include shortcodes and pdfs in WordPress search without plugin?
- How to embeded shortcode for another website
- To know whether insert shortcode in custom meta box
- Gutenberg Shortcode will turn html to html entity
- Need help in setting up a transient using API Key and if possible updating it in the ACF field
- the_content() not showing the content in good order (with a shortcode)
- Execute shortcode in backend
- Shortcodes not working in custom page
- Get label in user meta query
- Print shortcode according to site language
- create a shortcode for embedding google map in a page
- Use ACF array values in shortcode
- How to fix transparency in product sliders / featured products on home page?
- php in a shortcode
- Pull in excerpt with shortcode
- Short code format for cat tagging when posting from email
- WordPress core playlist function not showing artist and album info
- Problem in creating a shortcode form custom post type slider
- short code is not working in in custom wordpress theme it’s only working in default theme
- add php shortcode in return function
- Gallery Shortcode: using size=”full” doesn’t call the actual thumbnail image size
- loop on page makes shortcode fail
- style css to header for shortcodes
- What does this shortcode do?
- Shortcode leads to white screen [closed]
- How to stop an image link continuing to link adjacent text from a shortcode?
- create shortcodes for posts
- How Do I create a shortcode to dispaly a go to top button on any page or post