Next page arrow wordpress hosting

Styling Page-Links

Did you know you could split a single post up into different web pages by just typing in your post? Called the Page-Link tag, place your cursor in the spot where you want a page break to appear in your post and type (you need to use the text mode of the editor to do so). This technique can be used throughout a long post to make two or more pages out of a single post. Note: At one time there was a Next-Page quicktag button but it was deleted to reduce the clutter on the quicktag bar.

Next page arrow wordpress hosting are in

When you view your post on your site, the multi-page links appear as links at the bottom of the generated post and usually look like:

Examining the Page-Links Tag

The default look for the page-links is shown above. The web page you are on isn't highlighted as a link but shown as a solid number. If you do only a few multi-page posts, this might be all you need to have the reader continue reading the pages in sequence.

There are two template tags that may be used to style your page-links tag. The link_pages() and wp_link_pages() template tags. The link_pages() tag uses strings in quotes as parameters and the wp_link_pages() uses boolean phrases as parameters. Both do basically the same thing.

The default usage, shown above, for the wp_link_pages() tag is:

The parameters we'll be working with for the template tag are:

  • before: Text to put before all the links. Defaults to

    Pages.

  • after: Text to put after all the links. Defaults to

    .
  • next_or_number: Indicates whether page numbers should be used. Valid values are number (Default) and next
  • nextpagelink: Text for link to next page. Defaults to Next page.
  • previouspagelink: (string ) Text for link to previous page. Defaults to Previous page .
  • pagelink: Format string for page numbers. The  % in the parameter string will be replaced with the page number, so Page % generates "Page 1", "Page 2", etc. Defaults to %. just the page number.

You've seen the default look. Let's play with some other possibilities.

Changing the Look of Page-Links

By default, the page-links are in an HTML paragraph tag. Add a CSS class to the DIV section surrounding the paragraph tag and you have even more control over the look of the page-link tag.

The following use of the tag adds a DIV tag before and after the page-links, shows the word "Page" next to each page number, and when you are in the middle of the page order you will see the page number instead of the word "next", and lists the pages as shown below.

Let's give our style class "pagelink" a green color and italics:

Next page arrow wordpress hosting characters or HTML

Page 1 Page 2 Page 3

Want to have more fun? Let's design these so they do more than just tell the reader "page 1".

If you were on page three of four pages, it might look like this:


Using the wp_link_pages() you can add a extended character or character entity to replace the next and previous for an interesting look. Let's add the double right arrow » and double left arrow«.

And it might look like:

Note:When using extended characters or HTML character entities with wp_link_pages(). pass in the parameters an array instead of a string. In string query format, the ampersand required to create the entity is seen by wp_link_pages() as the string delimiter and will not work.

These are just a few samples and you can use your imagination to create a wide range of different styles and looks for your page links on your site or theme.

Watch this video!

Related articles

Get page type wordpress hostingDescription This function returns an array of pages that are in the blog, optionally constrained by parameters. This array is not tree-like (hierarchical). See the wp_list_pages() template tag...
External nofollow wordpress hostingDescription Just simple, if you use this plugin, rel=nofollow and target=_blank will be inserted automatically, for all the external links of your website posts, pages or theme menus. Also you...
Insert page break wordpress hostingWhen creating or editing a WordPress page or blog post, you can easily add images at any time using the WordPress Media Uploader tool. Here’s how to add an image, step-by-step, using the media...
Link to other blogs wordpress hostingThere are many ways to make a link blog, and many ways to do it with WordPress other than using this plugin, but I made this plugin to do it a certain way that I think is pretty easy to deal...
Add settings section wordpress hostingDescription Add a new section to a settings page. Settings Sections are the groups of settings you see on WordPress settings pages with a shared heading. In your plugin you can add new sections...