How to Make a Reverse Ordered List in WordPress

How to Make a Reverse Ordered List in WordPress

Making an ordered list (i.e. a numbered list: 1. 2. 3. 4. 5. etc.) is very easy in WordPress. But what if you wanted to reverse the order of a list – i.e. make a list that starts with the highest number and then counts down (e.g. 5. 4. 3. 2. 1.)?

In this post, we’ll run through how to do that.

Make a Regular Ordered List First

In order to make a reverse ordered list, first set your list up as if it were a regular ordered list.

Of course the way we do that is simply by selecting our list items and then clicking the ordered list button at the top of the visual editor like this.

ordered-list-button

If you switch to the Text view and look at the code for that list, you can see that the list itself begins with

<ol>

This stands for “ordered list.”

You will then notice that each “list item” is bracketed with

<li>  … </li>

The <li> stands for “list item.”

normal-list-code

And of course when we look at the result of that on the site, it looks like the following.

regular-order

Change List to Reverse Order

In order to change our list to count down instead of up, we’ll need to play with the code a little bit.

UPDATED (Thanks to Ian in the comments for this easier method.)

Switching to the Text view, immediately after the “ol” in the opening tag, go in and add “reversed” so that it looks like this:

reversed

 

When you save that, you should then get a reverse ordered list.

reverse-order