Please help support the continued development of AZIndex, particularly if you are using the plugin in your work or as part of a for-profit website. All contributions, no matter what size, will be gratefully received.

Headings & Subheadings

The AZIndex plugin generates indexes of blog posts and pages, meaning that every item in the index is a link to a post or page in the blog.

What the indexes items contain, apart from the link to the post, is up to you.  Each item can consist of a heading, a subheading, and a description.  The subheading and description are optional, but there must always be at least a heading.

For each of the three levels of an item, you can select what you want displayed from a list of the following options:

Title Displays the title of the post
Excerpt Displays the excerpt for the post
Author Displays the name of the author of the post
Custom Field Displays the contents of the specified custom field attached to the post
none Display nothing (subheadings and descriptions only)
Categories Displays a category the post is in (headings only)
Tags Displays a tag the post has (headings only)

Each of the options is described in more detail below:

Title

The title is simply the title of the post, nothing more, nothing less.

Excerpt

An excerpt is usually a short summary of a post written to be used in places where the full post text is too large and should convey a good idea of what the full post contains. Shorter excerpts are probably more desirable for an index, but that really depends on the contents of the index and the settings you use.  Note, you can embed HTML in excepts, and it will work in the index.  You could, for example, embed an image related to the post’s content.

Author

The option to display the name of the post’s author is useful in blogs where there is more than one author.  In that situation, you can group all an author’s post under one heading by selecting Author as the heading, and Title as the subheading.

Custom Field

A custom field is a piece of “metadata” containing a key and a value which is attached to a post.  You can add custom fields when you create or edit a post, or you can use one of several plugins to help you add them.  You can use custom fields for just about anything, but with AZIndex, they are most useful as an alternative way to display your posts in the index.  For example, many of the demo indexes on this site are dummy book reviews.  The titles of these posts happen to be fairly informative already, since they contain the book title and the author’s name, but there are some things you cannot do with just the title, like sort the index by the author’s last name, or group all the books by the same author together, under one heading.  This is where custom fields come in.

First, you need two custom fields for each post in the index:

  • Author: the author in the format: last name, first name (Note: not to be confused with the Author option above!)
  • Title: the title of the book (Note: not to be confused with the Title option above — I really should have picked better names!)

If you already have a large number of posts to add custom fields to, then doing this can be quite time consuming, but you end up with a more flexible blog and you may find you can use the custom fields you create in other ways too.  (Note: there are probably some plugins to help you here, but I do not have any personal experience with any.  Also, if you have some PHP programming skills, you can always write a bit of code to create the custom fields en mass — that’s how I add them to this blog.)

Now that you have your custom fields, the rest is very easy.  All you have to do is select the Custom Field option in the heading option and enter the key name of the custom field in the text box that appears next to it (that will be Author in our example).  And in the subheading you also select Custom Field and enter Title into the text box.

Finally, selected the Group items with the same heading… option, save the settings, and take a look at the results, as in this example here.  Is that cool, or what?  In that example I added Excerpt as the description and so readers have a one-line description of the book available to them directly in the index.

Custom fields are especially useful in this type of index because it frees you from having to list the name of the thing you are reviewing in the title of post.  If you attach one or more custom fields to the post with the information that should be listed in the index, you are free to be as creative as you like with the title—no need to put the name of the book, movie, album, etc. in there at all.

Note: although you can have more than one custom field with the same key name attached to the same post, currently AZIndex only handles one custom field per key.  If you use more than one custom field with the same key name, only one of the will show up, and there is no guarantee as to which one that will be.

none

Use this option to omit subheadings or descriptions from the index.

Categories

A new feature of AZIndex is the ability to sort the index by category.  This option is not a way to create an index of categories.  The index is still an index of posts, but it allows you to organize your index by category instead of by post title.

If you just select Categories as the heading and nothing else, all you will get is a long list of the same categories repeated over and over again, but if you add Title as the subheading, and select the Group items with the same heading… option, you will create an index where all the posts in a category are listed under that category name and the categories are sorted in alphabetical order.  So, to be useful, you should always use a subheading, at least, when you have Categories as the heading.

Now, if your posts are assigned to more than one category, you will quickly notice that those posts are appearing in more than one place in the index.  This is because AZIndex will create items for every category a post is in, as long as the category is included in the index.  So, if you use lots of categories on every post, your index could be very large indeed.  (Be sure to select the multipage option if that’s the case!)

Note that child categories can be included in the index by selecting the Include child categories option but please also note that while you can select which posts appear in the index by using parent categories, those parent categories themselves will not appear in an index sorted by category unless the post is also in to those parent categories directly.  For example, if your fiction review posts are in the child category Fiction but not the the parent category Book Reviews, and you selected all Book Reviews to be in the index, your fiction reviews will only be listed under the Fiction category.

Click here to see an example of a book review index sorted by category in the Gallery section.

You can further control which categories should appear in the index by using the Enter categories to include/exclude from index text box next to the headings option. For more information, see the Selecting Categories/Tags section below.

Tags

A new feature of AZIndex is the ability to sort the index by tag name.  This option is not a way to create an index of tags for your blog.  The index is still an index of posts, but it allows you to organize your index by tag name instead of by post title.

If you just select Tags as the heading and nothing else, all you will get is a long list of the same tags repeated over and over again, but if you add Title as the subheading, and select the Group items with the same heading… option, you will create an index where all the posts with the same tag name are listed under that tag and the tags themselves are sorted in alphabetical order.  So, to be useful, you should always use a subheading, at least, when you have Tags as the heading.

Now, if your posts have more than one tag, you will quickly notice that those posts are appearing in more than one place in the index.  This is because AZIndex will create an item for every tag a post has, as long as that posts with that tag name are selected to be in the index.  So, if you use lots of tags on every post, your index can grow to be very large, very quickly, so be sure to select the multipage option for the index, or else it will take an age to load the index page!

Click here to see an example of a book review index sorted by tag in the Gallery section.

You can further control which tags should appear in the index by using the Enter tags to include/exclude from index text box next to the headings option. For more information, see the Selecting Categories/Tags section below.

Excluding Tags/Categories

When it comes to selecting which tags or categories to appear in the index, you should first turn to the main Include/Exclude Tags/Categories options at the top of the settings page.  But if you are using tags or categories as the headings, you may find that those options have included too many tags/categories in your index.  The exclude text field that appears next to the headings option when you select either Tags or Categories is provided to help you fine tune what appears in your index.

For the rest of this section I will refer to tags only, but the same applies for categories also.

There are some cases where you can have  unwanted tags appearing in the index.  For example, on this site I have tagged all the demo posts with the tag demo so I can keep them out of the main blog.  But when I create an index of all the posts in the Fiction category using the Tags option as the heading, I see all the tags I want to see in the index (Mystery, Fantasy, Thriller, etc.) but I also get a large section of posts (i.e. all of them!) under the tag Demo.  I can’t easily avoid this unless I enter in every other tag I am using with the book reviews, which would be tedious.   But the solution is easy.  I can exclude the Demo tag’s section from the index by adding this to the exclude tags text box next to the heading option:

Enter tags to exclude from index:
Demo

There is no need to put a ~ sign in front of the tag, since this field only removes tags.  If you do use one by mistake, then it is removed for you.

Additional Comments

  • When you have selected Tags or Categories as the heading, you may not always see as many of the tags/categories appearing in the index as you think there should be.  For example, if you chose to include all posts with the tag Book Reviews, then even if those posts have other tags (like Classic, Fantasy, Mystery, etc.) then they will not appear in the index, because the plugin only includes the tag you specified.  If you want those other tags to appear in the index, you have to add them to the include/exclude tags option explicitly.  Note, there are other ways to solve this problem.  You could include all posts, and exclude the Book Reviews tag in the exclude text box next to the heading option.  You could also make Book Reviews a category instead of a tag, and select all posts in the Book Reviews category.
  • AZIndex ignores category parent-child relationships when organizing an index with Categories as the heading option.  They are all just sorted in alphabetical order.
  • You cannot group all descriptions under the same, shared subheadings.  This means that if you are using the Tags or Categories option as the index headings, you cannot group, say, all the book reviews by the same author under one subheading for that author.   This restriction may be lifted in a future version of AZIndex.
  • Only one custom field per post with the same key is supported by AZIndex.  If you have more than one, what you see in the index is “undefined.” (Don’t you just love that term!)
  • Always use a subheading if you select either Tags or Categories as the heading.
  • If you have a lot of tags or categories assigned to your posts, then an index with Tags or Categories as the heading could contain a very large number of items.  For example, if you have 200 blog posts and use, on average, 10 tags per post (I have seen it done!) then you will have 2,000 items in your index if you include everything.  Fortunately, if you use the multipage option to reduce the number of items displayed at one time to something sensible, your index pages will still load very quickly after the first time the index is sorted.
Continue to the next page »

Comments are closed.