Home>Article>CMS Tutorial> The simplest way to manually enter the page number and jump to the next page in WordPress
The following tutorial column ofWordPresswill introduce to you the simplest method of manually entering the page number and jumping to the page in WordPress. I hope it will be helpful to friends in need!
Users often ask if they can have a page turning function that allows them to manually input page numbers and realize jumps. It is very simple, with only four lines of code:
can be added to the appropriate location in the topic classification archive template.
The code is taken from a plug-in called smart paging: wp smart pagination. The plug-in itself has not been updated for many years. In addition to the above code, the plug-in also comes with page turning code.
Things that need to be improved: the current page number cannot be displayed, enter a page number that does not exist, cannot jump to the last page like the WP background article list, directly 404, this function has been studied many years ago, and recently I remembered it again, maybe some experts can help me improve it.
Matching style:
.zm-input-number { background: #fff; text-align: center; border-radius: 2px; border: 1px solid #3690cf; } .zm-button { background: #fff; cursor: pointer; border-radius: 2px; border: 1px solid #3690cf; -webkit-appearance: none; } .zm-button:hover { background: #3690cf; color: #fff; -webkit-appearance: none; }
Can be modified accordingly according to the theme style.
This function does not feel very useful. Normal viewers will not directly skip the new article and read the following ones. It can only be said to be multiple choices.
The above is the detailed content of The simplest way to manually enter the page number and jump to the next page in WordPress. For more information, please follow other related articles on the PHP Chinese website!