Wordpress Blog



Topics

  1. Wordpress Blog Templates
  2. Free Wordpress Blog
  3. Wordpress Blog Themes
  4. Wordpress Blog App
  5. Wordpress Blog Sites
  6. Wordpress Blog Templates

We would like to show you a description here but the site won’t allow us. Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.

  • Things Bloggers Need to Know
    • Managing Comments

What is a “blog”? What is a “blog”?

“Blog” is an abbreviated version of “weblog,” which is a term used to describe websites that maintain an ongoing chronicle of information. A blog features diary-type commentary and links to articles on other websites, usually presented as a list of entries in reverse chronological order. Blogs range from the personal to the political, and can focus on one narrow subject or a whole range of subjects.

Many blogs focus on a particular topic, such as web design, home staging, sports, or mobile technology. Some are more eclectic, presenting links to all types of other sites. And others are more like personal journals, presenting the author’s daily life and thoughts.

Generally speaking (although there are exceptions), blogs tend to have a few things in common:

  • A main content area with articles listed chronologically, newest on top. Often, the articles are organized into categories.An archive of older articles.
  • A way for people to leave comments about the articles.
  • A list of links to other related sites, sometimes called a “blogroll”.
  • One or more “feeds” like RSS, Atom or RDF files.

Some blogs may have additional features beyond these. Watch this short video for a simple explanation for what a blog is.

What is a “blogger”? What is a “blogger”?

A blogger is a person who owns or runs a blog or a person who maintains the blog. That is, posting articles or new posts, information, sharing the most up-to-date news, opinions and case studies to name but a few. Such entries are known as blog posts.

The Blog Content The Blog Content

Content is the raison d’être for any website. Retail sites feature a catalog of products. University sites contain information about their campuses, curriculum, and faculty. News sites show the latest news stories. For a personal blog, you might have a bunch of observations, or reviews. Without some sort of updated content, there is little reason to visit a website more than once.

On a blog, the content consists of articles (also sometimes called “posts” or “entries”) that the author(s) writes. Yes, some blogs have multiple authors, each writing his/her own articles. Typically, blog authors compose their articles in a web-based interface, built into the blogging system itself. Some blogging systems also support the ability to use stand-alone “weblog client” software, which allows authors to write articles offline and upload them at a later time.

Want an interactive website? Wouldn’t it be nice if the readers of a website could leave comments, tips or impressions about the site or a specific article? With blogs, they can! Posting comments is one of the most exciting features of blogs.

Most blogs have a method to allow visitors to leave comments. There are also nifty ways for authors of other blogs to leave comments without even visiting the blog! Called “pingbacks” or “trackbacks“, they can inform other bloggers whenever they cite an article from another site in their own articles. All this ensures that online conversations can be maintained painlessly among various site users and websites.

The Difference Between a Blog and CMS? The Difference Between a Blog and CMS?

Software that provides a method of managing your website is commonly called a CMS or “Content Management System”. Many blogging software programs are considered a specific type of CMS. They provide the features required to create and maintain a blog, and can make publishing on the internet as simple as writing an article, giving it a title, and organizing it under (one or more) categories. While some CMS programs offer vast and sophisticated features, a basic blogging tool provides an interface where you can work in an easy and, to some degree, intuitive manner while it handles the logistics involved in making your composition presentable and publicly available. In other words, you get to focus on what you want to write, and the blogging tool takes care of the rest of the site management.

WordPress is one such advanced blogging tool and it provides a rich set of features. Through its Administration Screen, you can set options for the behavior and presentation of your weblog. Via these Administration Screen, you can easily compose a blog post, push a button, and be published on the internet, instantly! WordPress goes to great pains to see that your blog posts look good, the text looks beautiful, and the html code it generates conforms to web standards.

If you’re just starting out, read Getting Started with WordPress, which contains information on how to get WordPress set up quickly and effectively, as well as information on performing basic tasks within WordPress, like creating new posts or editing existing ones.

Things Bloggers Need to Know Things Bloggers Need to Know

Create macos catalina bootable usb. In addition to understanding how your specific blogging software works, such as WordPress, there are some terms and concepts you need to know.

Archives Archives

A blog is also a good way to keep track of articles on a site. A lot of blogs feature an archive based on dates (like a monthly or yearly archive). The front page of a blog may feature a calendar of dates linked to daily archives. Archives can also be based on categories featuring all the articles related to a specific category.

It does not stop there; you can also archive your posts by author or alphabetically. The possibilities are endless. This ability to organize and present articles in a composed fashion is much of what makes blogging a popular personal publishing tool.

Feeds Feeds

A Feed is a function of special software that allows “Feedreaders” to access a site automatically looking for new content and then post updates about that new content to another site. This provides a way for users to keep up with the latest and hottest information posted on different blogging sites. Some Feeds include RSS (alternately defined as “Rich Site Summary” or “Really Simple Syndication”), Atom or RDF files. Dave Shea has written a comprehensive summary of feeds.

Syndication Syndication

Wordpress blog id

A feed is a machine readable (usually XML) content publication that is updated regularly. Many weblogs publish a feed (usually RSS, but also possibly Atom and RDF and so on, as described above). There are tools out there that call themselves “feedreaders”. What they do is they keep checking specified blogs to see if they have been updated, and when the blogs are updated, they display the new post, and a link to it, with an excerpt (or the whole contents) of the post. Each feed contains items that are published over time. When checking a feed, the feedreader is actually looking for new items. New items are automatically discovered and downloaded for you to read, so you don’t have to visit all the blogs you are interested in. All you have to do with these feedreaders is to add the link to the RSS feed of all the blogs you are interested in. The feedreader will then inform you when any of the blogs have new posts in them. Most blogs have these “Syndication” feeds available for the readers to use.

Managing Comments Managing Comments

One of the most exciting features of blogging tools are the comments. This highly interactive feature allows users to comment upon article posts, link to your posts, and comment on and recommend them. These are known as trackbacks and pingbacks. We’ll also discuss how to moderate and manage comments and how to deal with the annoying trend in “comment spam”, when unwanted comments are posted to your blog.

Trackbacks Trackbacks

Trackbacks were originally developed by SixApart, creators of the MovableType blog package. SixApart has a good introduction to trackbacks:

In a nutshell, TrackBack was designed to provide a method of notification between websites: it is a method of person A saying to person B, “This is something you may be interested in.” To do that, person A sends a TrackBack ping to person B.

A better explanation is this:

  • Person A writes something on their blog.
  • Person B wants to comment on Person A’s blog, but wants her own readers to see what she had to say, and be able to comment on her own blog
  • Person B posts on her own blog and sends a trackback to Person A’s blog
  • Person A’s blog receives the trackback, and displays it as a comment to the original post. This comment contains a link to Person B’s post

The idea here is that more people are introduced to the conversation (both Person A’s and Person B’s readers can follow links to the other’s post), and that there is a level of authenticity to the trackback comments because they originated from another weblog. Unfortunately, there is no actual verification performed on the incoming trackback, and indeed they can even be faked.

Most trackbacks send to Person A only a small portion (called an “excerpt”) of what Person B had to say. This is meant to act as a “teaser”, letting Person A (and his readers) see some of what Person B had to say, and encouraging them all to click over to Person B’s site to read the rest (and possibly comment).

Person B’s trackback to Person A’s blog generally gets posted along with all the comments. This means that Person A can edit the contents of the trackback on his own server, which means that the whole idea of “authenticity” isn’t really solved. (Note: Person A can only edit the contents of the trackback on his own site. He cannot edit the post on Person B’s site that sent the trackback.)

SixApart has published an official trackback specification.

Pingbacks Pingbacks

Pingbacks were designed to solve some of the problems that people saw with trackbacks. That is why the official pingback documentation sounds so much like the description of a trackback:

For example, Yvonne writes an interesting article on her Web log. Kathleen reads Yvonne’s article and comments about it, linking back to Yvonne’s original post. Using pingback, Kathleen’s software can automatically notify Yvonne that her post has been linked to, and Yvonne’s software can then include this information on her site.

The best way to think about pingbacks is as remote comments:

  • Person A posts something on his blog.
  • Person B posts on her own blog, linking to Person A’s post. This automatically sends a pingback to Person A when both have pingback enabled blogs.
  • Person A’s blog receives the pingback, then automatically goes to Person B’s post to confirm that the pingback did, in fact, originate there.
Wordpress

The pingback is generally displayed on Person A’s blog as simply a link to Person B’s post. It is commonly believed that pingbacks do not send any content, as trackbacks do. This is not correct. If you get a pingback, you will see an excerpt from that blog in the Edit Comments section of your dashboard. The issue is that very few themes display these excerpts from pingbacks. The default WordPress themes, for example, do not display pingback excerpts.

In fact, there is only one significant difference between pingbacks and trackbacks: Pingbacks and trackbacks use drastically different communication technologies (XML-RPC and HTTP POST, respectively). But that difference is important because trackbacks have become the target of so much spam. The automatic verification process introduces a level of authenticity, making it harder to fake a pingback.

Some feel that trackbacks are superior because readers of Person A’s blog can at least see some of what Person B has to say, and then decide if they want to read more (and therefore click over to Person B’s blog). Others feel that pingbacks are superior because they create a verifiable connection between posts.

Using Pingbacks and Trackbacks Using Pingbacks and Trackbacks

Comments on blogs are often criticized as lacking authority, since anyone can post anything using any name they like: there’s no verification process to ensure that the person is who they claim to be. Trackbacks and Pingbacks both aim to provide some verification to blog commenting.

To enable trackbacks and pingbacks, in the Discussion Settings of your Administration Screen, select these items under ‘Default article settings’:

Attempt to notify any blogs linked to from the article.

Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.

Selecting one option and not the other would not be very neighborly 😉

Once enabled, trackbacks and pingbacks from other sites will appear in your Administration Screen just like other comments, but on your post pages, they will appear according to your theme’s design.

Once enabled, pingbacks are sent automatically when you publish your post, you don’t have to do anything. To send trackbacks, you will need to find the trackback URL somewhere on the post page you are linking to. If you can’t find one, try to determine if the site supports pingbacks. If it does, you should not send trackbacks as well. Copy/paste the trackback URL into the Send Trackbacksfield on your Add New Post screen. If you don’t see this field, go to the screen options and select the Send Trackbacks option. Note that selecting this does not send trackbacks, it only displays the field called Send Trackbacks. When you publish your post, trackbacks will be sent to the URLs you pasted into the field. This field will also show the status of trackbacks and pingbacks on your Edit Post screen.

If there is someone that wants to send a trackback to your WordPress blog because their blogging software does not support pingbacks, your trackback URL they should insert into their post edit screen is your blog post’s permalink with “trackback/” appended to the end. If their software supports pingbacks, they do not need to do anything, the process is automatic.

Comment Moderation Comment Moderation

Wordpress Blog Templates

Comment Moderation is a feature which allows the website owner and author to monitor and control the comments on the different article posts, and can help in tackling comment spam. It lets you moderate comments, & you can delete unwanted comments, approve cool comments and make other decisions about the comments.

Comment Spam Comment Spam

Comment Spam refers to useless comments (or trackbacks, or pingbacks) to posts on a blog. These are often irrelevant to the context value of the post. They can contain one or more links to other websites or domains. Spammers use Comment Spam as a medium to get higher page rank for their domains in Google, so that they can sell those domains at a higher price sometime in future or to obtain a high ranking in search results for an existing website.

Spammers are relentless; because there can be substantial money involved, they work hard at their “job.” They even build automated tools (robots) to rapidly submit their spam to the same or multiple weblogs. Many webloggers, especially beginners, sometimes feel overwhelmed by Comment Spam.

There are solutions, though, to avoiding Comment Spam. WordPress includes many tools for combating Comment Spam. With a little up front effort, Comment Spam can be manageable, and certainly no reason to give up weblogging.

Pretty Permalinks Pretty Permalinks

Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to refer to your article (or section), or how you might send a link to your story in an e-mail message. Because others may link to your individual postings, the URL to that article shouldn’t change. Permalinks are intended to be permanent (valid for a long time).

“Pretty” Permalinks is the idea that URLs are frequently visible to the people who click them, and should therefore be crafted in such a way that they make sense, and not be filled with incomprehensible parameters. The best Permalinks are “hackable,” meaning a user might modify the link text in their browser to navigate to another section or listing of the weblog. For example, this is how the default Permalink to a story might look in a default WordPress installation:

How is a user to know what “p” represents? Where did the number 423 come from?

In contrast, here is a well-structured, “Pretty” Permalink which could link to the same article, once the installation is configured to modify permalinks:

One can easily guess that the Permalink includes the date of the posting, and the title, just by looking at the URL. One might also guess that hacking the URL to be /archives/2003/05/ would get a list of all the postings from May of 2003 (pretty cool). For more information on possible Permalink patterns in WordPress, see Using Permalinks.

Blog by email Blog by email

Some blogging tools offer the ability to email your posts directly to your blog, all without direct interaction through the blogging tool interface. WordPress offers this cool feature. Using email, you can now send in your post content to a pre-determined email address & voila! Your post is published!

Post Slugs Post Slugs

If you’re using Pretty Permalinks, the Post Slug is the title of your article post within the link. The blogging tool software may simplify or truncate your title into a more appropriate form for using as a link. A title such as “I’ll Make A Wish” might be truncated to “ill-make-a-wish”. In WordPress, you can change the Post Slug to something else, like “make-a-wish”, which sounds better than a wish made when sick.

Excerpt Excerpt

Excerpts are condensed summaries of your blog posts, with blogging tools being able to handle these in various ways. In WordPress, Excerpts can be specifically written to summarize the post, or generated automatically by using the first few paragraphs of a post or using the post up to a specific point, assigned by you.

Plugins Plugins

Plugins are cool bits of programming scripts that add additional functionality to your blog. These are often features which either enhance already available features or add them to your site.

WordPress offers simple and easy ways of adding Administration Screen, there is a Plugins Screen. You can easily search, install and activate Plugins from this Screen.

Basics – A Few Blogging Tips Basics – A Few Blogging Tips

Starting a new blog is difficult and this can put many people off. Some may get off to a good start only to become quickly discouraged because of the lack of comments or visits. You want to stand out from this crowd of millions of bloggers, you want to be one of the few hundred thousand blogs that are actually visited. Here are some simple tips to help you on your way to blogging mastery:

  1. Post regularly, but don’t post if you have nothing worth posting about.
  2. Stick with only a few specific genres to talk about.
  3. Don’t put ‘subscribe’ and ‘vote me’ links all over the front page until you have people that like your blog enough to ignore them (they’re usually just in the way).
  4. Use a clean and simple theme if at all possible.
  5. Enjoy, blog for fun, comment on other peoples’ blogs (as they normally visit back).
  6. Have fun blogging and remember, there are no rules to what you post on your blog!

Topics

  • The Template File Hierarchy
  • The Template Hierarchy In Detail
  • Filter Hierarchy

As discussed, template files are modular, reusable files, used to generate the web pages on your WordPress site. Some template files (such as the header and footer template) are used on all of your site’s pages, while others are used only under specific conditions.

This article explains how WordPress determines which template file(s) to use on individual pages. If you want to customize an existing WordPress theme it will help you decide which template file needs to be edited.

Tip: You can also use Conditional Tags to control which templates are loaded on a specific page.

The Template File Hierarchy The Template File Hierarchy

Overview Overview

WordPress uses the query string to decide which template or set of templates should be used to display the page. The query string is information that is contained in the link to each part of your website. It comes after the initial question mark and may contain a number of parameters separated by ampersands.

Put simply, WordPress searches down through the template hierarchy until it finds a matching template file. To determine which template file to use, WordPress:

  1. Matches every query string to a query type to decide which page is being requested (for example, a search page, a category page, etc);
  2. Selects the template in the order determined by the template hierarchy;
  3. Looks for template files with specific names in the current theme’s directory and uses the first matching template file as specified by the hierarchy.

With the exception of the basic index.php template file, you can choose whether you want to implement a particular template file or not.

If WordPress cannot find a template file with a matching name, it will skip to the next file in the hierarchy. If WordPress cannot find any matching template file, the theme’s index.php file will be used.

Examples Examples

If your blog is at http://example.com/blog/ and a visitor clicks on a link to a category page such as http://example.com/blog/category/your-cat/, WordPress looks for a template file in the current theme’s directory that matches the category’s ID to generate the correct page. More specifically, WordPress follows this procedure:

  1. Looks for a template file in the current theme’s directory that matches the category’s slug. If the category slug is “unicorns,” then WordPress looks for a template file named category-unicorns.php.
  2. If category-unicorns.php is missing and the category’s ID is 4, WordPress looks for a template file named category-4.php.
  3. If category-4.php is missing, WordPress will look for a generic category template file, category.php.
  4. If category.php does not exist, WordPress will look for a generic archive template, archive.php.
  5. If archive.php is also missing, WordPress will fall back to the main theme template file, index.php.

Visual Overview Visual Overview

The following diagram shows which template files are called to generate a WordPress page based on the WordPress template hierarchy.

The Template Hierarchy In Detail The Template Hierarchy In Detail

While the template hierarchy is easier to understand as a diagram, the following sections describe the order in which template files are called by WordPress for a number of query types.

Home Page display Home Page display

By default, WordPress sets your site’s home page to display your latest blog posts. This page is called the blog posts index. You can also set your blog posts to display on a separate static page. The template file home.php is used to render the blog posts index, whether it is being used as the front page or on separate static page. If home.php does not exist, WordPress will use index.php.

  1. home.php
  2. index.php

Note: If front-page.php exists, it will override the home.php template.

Front Page display Front Page display

The front-page.php template file is used to render your site’s front page, whether the front page displays the blog posts index (mentioned above) or a static page. The front page template takes precedence over the blog posts index (home.php) template. If the front-page.php file does not exist, WordPress will either use the home.php or page.php files depending on the setup in Settings → Reading. If neither of those files exist, it will use the index.php file.

  1. front-page.php – Used for both “your latest posts” or “a static page” as set in the front page displays section of Settings → Reading.
  2. home.php – If WordPress cannot find front-page.php and “your latest posts” is set in the front page displays section, it will look for home.php. Additionally, WordPress will look for this file when the posts page is set in the front page displays section.
  3. page.php – When “front page” is set in the front page displays section.
  4. index.php – When “your latest posts” is set in the front page displays section but home.php does not exist or when front page is set but page.php does not exist.

As you can see, there are a lot of rules to what path WordPress takes. Using the chart above is the best way to determine what WordPress will display.

Privacy Policy Page display Privacy Policy Page display

The privacy-policy.php template file is used to render your site’s Privacy Policy page. The Privacy Policy page template takes precedence over the static page (page.php) template. If the privacy-policy.php file does not exist, WordPress will either use the page.php or singular.php files depending on the available templates. If neither of those files exist, it will use the index.php file.

  1. privacy-policy.php – Used for the Privacy Policy page set in the Change your Privacy Policy page section of Settings → Privacy.
  2. custom template file – The page template assigned to the page. See get_page_templates().
  3. page-{slug}.php – If the page slug is privacy, WordPress will look to use page-privacy.php.
  4. page-{id}.php – If the page ID is 6, WordPress will look to use page-6.php.
  5. page.php
  6. singular.php
  7. index.php

Single Post Single Post

The single post template file is used to render a single post. WordPress uses the following path:

  1. single-{post-type}-{slug}.php – (Since 4.4) First, WordPress looks for a template for the specific post. For example, if post type is product and the post slug is dmc-12, WordPress would look for single-product-dmc-12.php.
  2. single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.
  3. single.php – WordPress then falls back to single.php.
  4. singular.php – Then it falls back to singular.php.
  5. index.php – Finally, as mentioned above, WordPress ultimately falls back to index.php.

Single Page Single Page

The template file used to render a static page (page post-type). Note that unlike other post-types, page is special to WordPress and uses the following path:

Site
  1. custom template file – The page template assigned to the page. See get_page_templates().
  2. page-{slug}.php – If the page slug is recent-news, WordPress will look to use page-recent-news.php.
  3. page-{id}.php – If the page ID is 6, WordPress will look to use page-6.php.
  4. page.php
  5. singular.php
  6. index.php

Category Category

Rendering category archive index pages uses the following path in WordPress:

Free Wordpress Blog

  1. category-{slug}.php – If the category’s slug is news, WordPress will look for category-news.php.
  2. category-{id}.php – If the category’s ID is 6, WordPress will look for category-6.php.
  3. category.php
  4. archive.php
  5. index.php

Tag Tag

To display a tag archive index page, WordPress uses the following path:

  1. tag-{slug}.php – If the tag’s slug is sometag, WordPress will look for tag-sometag.php.
  2. tag-{id}.php – If the tag’s ID is 6, WordPress will look for tag-6.php.
  3. tag.php
  4. archive.php
  5. index.php

Custom Taxonomies Custom Taxonomies

Custom taxonomies use a slightly different template file path:

  1. taxonomy-{taxonomy}-{term}.php – If the taxonomy is sometax, and taxonomy’s term is someterm, WordPress will look for taxonomy-sometax-someterm.php. In the case of post formats, the taxonomy is ‘post_format’ and the terms are ‘post-format-{format}. i.e. taxonomy-post_format-post-format-link.php for the link post format.
  2. taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php.
  3. taxonomy.php
  4. archive.php
  5. index.php

Custom Post Types Custom Post Types

Wordpress Blog Themes

Custom Post Types use the following path to render the appropriate archive index page.

  1. archive-{post_type}.php – If the post type is product, WordPress will look for archive-product.php.
  2. archive.php
  3. index.php

(For rendering a single post type template, refer to the single post display section above.)

Author display Author display

Based on the above examples, rendering author archive index pages is fairly explanatory:

  1. author-{nicename}.php – If the author’s nice name is matt, WordPress will look for author-matt.php.
  2. author-{id}.php – If the author’s ID were 6, WordPress will look for author-6.php.
  3. author.php
  4. archive.php
  5. index.php

Date Date

Date-based archive index pages are rendered as you would expect:

  1. date.php
  2. archive.php
  3. index.php

Search Result Search Result

Search results follow the same pattern as other template types:

  1. search.php
  2. index.php

404 (Not Found) 404 (Not Found)

Likewise, 404 template files are called in this order:

Wordpress Blog App

  1. 404.php
  2. index.php

Attachment Attachment

Rendering an attachment page (attachment post-type) uses the following path:

  1. {MIME-type}.php – can be any MIME type (For example: image.php, video.php, pdf.php). For text/plain, the following path is used (in order):
    1. text-plain.php
    2. plain.php
    3. text.php
  2. attachment.php
  3. single-attachment-{slug}.php – For example, if the attachment slug is holiday, WordPress would look for single-attachment-holiday.php.
  4. single-attachment.php
  5. single.php
  6. singular.php
  7. index.php

Wordpress Blog Sites

Embeds Embeds

The embed template file is used to render a post which is being embedded. Since 4.5, WordPress uses the following path:

  1. embed-{post-type}-{post_format}.php – First, WordPress looks for a template for the specific post. For example, if its post type is post and it has the audio format, WordPress would look for embed-post-audio.php.
  2. embed-{post-type}.php – If the post type is product, WordPress would look for embed-product.php.
  3. embed.php – WordPress then falls back to embed.php.
  4. Finally, WordPress ultimately falls back to its own wp-includes/theme-compat/embed.php template.

Non-ASCII Character Handling Non-ASCII Character Handling

Since WordPress 4.7, any dynamic part of a template name which includes non-ASCII characters in its name actually supports both the un-encoded and the encoded form, in that order. You can choose which to use.

Here’s the page template hierarchy for a page named “Hello World 😀” with an ID of 6:

  • page-hello-world-😀.php
  • page-hello-world-%f0%9f%98%80.php
  • page-6.php
  • page.php
  • singular.php

The same behaviour applies to post slugs, term names, and author nicenames.

Filter Hierarchy Filter Hierarchy

The WordPress template system lets you filter the hierarchy. This means that you can insert and change things at specific points of the hierarchy. The filter (located in the get_query_template() function) uses this filter name: '{$type}_template' where $type is the template type.

Wordpress Blog Templates

Here is a list of all available filters in the template hierarchy:

  • embed_template
  • 404_template
  • search_template
  • frontpage_template
  • home_template
  • privacypolicy_template
  • taxonomy_template
  • attachment_template
  • single_template
  • page_template
  • singular_template
  • category_template
  • tag_template
  • author_template
  • date_template
  • archive_template
  • index_template

Example Example

For example, let’s take the default author hierarchy:

  • author-{nicename}.php
  • author-{id}.php
  • author.php

To add author-{role}.php before author.php, we can manipulate the actual hierarchy using the ‘author_template’ template type. This allows a request for /author/username where username has the role of editor to display using author-editor.php if present in the current themes directory.