WordPress School: What’s the Difference Between the Display Posts and Archive Shortcodes

Badge - Learn WordPress with Lorelle VanFossen at WordPress School.In Lorelle’s WordPress School free online course, we’ve been exploring shortcodes. In this tutorial, let’s take a look at two shortcodes that appear to be the same on the surface.

WordPress has long had the ability to generate a list of posts in a Page or post with a bit of code in the archives() template tag. This and the Display Posts code are available as shortcodes on WordPress.com and WordPress self-hosted sites using the Jetpack WordPress Plugin.

What’s the difference?

The Display Posts Shortcode

The Display Posts Shortcode allows you to lists posts on a Page or post based upon specific parameters.

This is an example of a list of the last 10 posts published on this site. The list will change as more posts are added.

[display-posts posts_per_page="10"]


The Display Posts Shortcode allows following parameters, the elements used to generated the content:

  • author
  • category
  • date_format
  • ID
  • image_size
  • include_content
  • include_date
  • include_excerpt
  • offset
  • order
  • orderby
  • portfolio_type
  • post_parent
  • post_status
  • post_type
  • posts_per_page
  • tag
  • taxonomy, tax_term, tax_operator
  • wrapper

The Archives Shortcode

The Archives Shortcode creates an index list of your posts based upon its parameter options.

Here is an example of the archives shortcode listing the last 10 posts I’ve published on this site. This list will change in the future as I continue to publish more posts.

[archives limit=10]


If handled right, this list should match the first example above.

The parameters for the archives shortcode are:

  • type (yearly, monthly, weekly, daily, etc.)
  • format (drop-down menu, unordered list, etc.)
  • limit (number of entries)
  • showcount (post count of each archive entry)
  • before (show text before each entry)
  • after (show text after each entry)
  • order (sort order ascending or descending)

The archives shortcode offers fewer options than the display posts shortcode, yet, you can make both shortcodes do the same thing.

If they work the same, which one should you choose to meet the needs of your site?

What’s the Difference Between the Two?

Archives is a simple structure. It permits display of posts in a list set in chronological or reverse chronological order. You may group the list by type, sorted by year, month, week, etc., or change the format from an HTML list to a drop-down menu, but there isn’t much more you can do.

Display Posts allows more control over the display of the posts. Yes, you can duplicate the list to match the archives shortcode, but you have more choices.

Both shortcodes are dynamic, changing as you add new posts to your site.

If you have multiple contributors on your site, you can list posts by author.

If you are working on an article series, consider using the display posts shortcode to list the posts for the unique tag you are using to represent the article series.

If you want to create a site map on a Page, you may offer it sorted by category, tag, and with or without the featured post image and excerpt. See the example use of both shortcodes on my Site Map. Can you tell which shortcode examples I used?

The archives shortcode produces a list. Display posts shortcode can reproduce that same list, but adds more flexibility in the programming options.

Let’s explore a few more possibilities with the display posts shortcode, which you cannot do with the archives shortcode.

NOTE: The above shortcodes list posts only. To list Pages, see the List Pages Shortcode and Site Map Shortcode.

Display Posts with Excerpts

The display posts shortcodes takes the simplicity of the archives shortcode and extends its features and abilities. For example, this is a list of the most recent five posts I’ve published in the Blog Exercises category featuring an excerpt, the first 100 words or so of the post.

[display-posts category="blog-exercises" posts_per_page="5" include_excerpt="true"]

  • Blog Exercise: New Years Reboot, Restart, Kick Ass - “It’s that time of year when the world falls in love…” The Christmas Waltz by Jule Styne and Sammy Cahn I’d like to think that New Year’s thinking includes bringing back the love to your blog. You might not think that, but let’s go with that belief as we continue with this year’s Blog Exercises. … … Continue reading
  • Blog Exercises: Which Stats Matter - In this ongoing series called Blog Exercises, let’s explore the stats that matter, the ones you should be paying attention to on your site and off. On your site, you should be paying attention to: Most Popular Posts: Are your most popular posts related by topic? If so, there is clearly a driving interest in … … Continue reading
  • Blog Exercises: Blog a Conversation - In this ongoing series called Blog Exercises, today you will blog a conversation. “I don’t want to.” “Sure, you do.” “Nah. Don’t want to.” “This is a chance to improve your blogging.” “Uh-huh.” “This is a change to improve your writing skills.” “Nope.” “You will do it because I said so. Got it?” “Okay.” Writing … … Continue reading
  • Blog Exercises: What Do You Mean By That? - Standing with a group of bloggers at a conference recently, someone said something and another blogger asked, “What do you mean by that?” I don’t remember the topic, but I loved the response. This was a person who wanted to know more. They didn’t want to just assume they knew what the other was talking … … Continue reading
  • Blog Exercises: Are You Trending? - In social media, trending are topics attracting the attention of most of the people, thus popular. Unfortunately, trending topics are self-feeding, an accident along the highway where everyone wants to slow down and take a look. Then they want to tell others about it so they can look. Walking by a student glued to their … … Continue reading

If your WordPress Theme and your site uses featured post images, you may add the parameter to display the post image next to the post title and/or the excerpt, creating a magazine effect.

[display-posts category="crafts" posts_per_page="-1" image_size="thumbnail" include_excerpt="true" wrapper="div"]

WordPress - Display Posts Shortcode with featured images and excerpts in divs.

In the above example, notice that the thumbnail images are not the same size or shape. One of the images is vertical rather than horizontal, and others are smaller than the thumbnail size specifications. If you choose this option, ensure your featured images are standardized sizes for a consistent look.

Also notice that one of the parameters adds a DIV around each item in the list. By default, the shortcode puts the list in an unordered HTML list. By changing the wrapper parameter to div, the bullet is removed and CSS may be easily used to style the post excerpts and images.

List Related Posts by Tag

Wish to add a list of related posts to the bottom of a post? Find the tags related to this post on your site and include them in the display posts shortcode such as:

[display-posts tag="tag1, tag2, tag3" posts_per_page="10"]

This is an example of using the display posts shortcode to showcase posts by related tags.



Assignment

Lorelle's WordPress School Assignment Badge.Your WordPress School assignment is to experiment with simple uses of the display post and archive shortcodes.

Listing posts within the context of a post article or on a Page for reference is another way of easily promoting related content, article series, categories, specific tags, or other groups of content.

Your options include:

  • Create a list of related posts by tags at the bottom of a post.
  • Create a site map on a new Page on your site.
  • Experiment with either list to add excerpts and featured post images. Remember, the post must use the featured post image to be visible in the list.

I’ll have more on various ways to use the display post shortcode in a future WordPress School exercise, helping you explore all the various ways to showcase your content on your site with a few bits of easy-to-use code.

This is a tutorial from Lorelle’s WordPress School. For more information, and to join this free, year-long, online WordPress School, see:


Blog Exercises: Ingredients of a Well-Designed Site

Blog Exercises on Lorelle on WordPress.I was asked by a student in my WordPress class recently what defined a “professional blog,” one that met all the criteria for a well-designed, well-formed site that met web standards.

What a marvelous question!

We brainstormed all the elements that make up a web standard site, and mixed in personal preferences of the students along with lists from a wide variety of online articles that attempted to set the criteria for what defined a well-designed site.

Here is our list, related topics grouped by the students.

  • Readability:
    • Clean easy-to-read, original content.
    • It is both a pleasure to view and read.
    • Consistent topical content.
    • Content is well organized, grouped by categories and tags.
    • Headings within the content are used well and simply designed.
    • Paragraphs are short not long.
    • Black colored font (not gray or shades of gray or black).
    • Black letters on white background or white letters on black background, or black letters on pastel colored backgrounds ONLY.
    • Content fonts at least 11 pt. tall.
    • Lists are clearly identifiable with bullets or numbers.
    • Nested lists are well-designed with appropriate whitespace indention.
    • Little or no unrelated content.
    • Avoid too many links. You don’t have to link every word longer than 6 characters.
    • Citations and blockquotes are designed to separate others’ words from the author’s.
  • Identity/Branding:
    • Original content.
    • Clear purpose, goals, and mission.
    • The design and branding is consistent across every page of the site.
    • The first, second, and third impression convey the same information and message on what the site is about.
    • The branding (header art) is the same on every page.
    • Calls-to-action are clearly identifiable and lead to no more than 3 clicks to conversion.
    • You want to get to know this person or company and do business with them.
  • Multimedia:
    • Images are original, in focus, and not FX’d up.
    • Images are aligned within the content so the words either wrap around the images or the images stretch across the content column with words above and below.
    • Images are large enough to SEE without overwhelming or competing with the content.
    • Image file sizes are small for fast downloading, but appropriate to viewing without distortion.
    • Images complement content and design.
    • Images are original, not stock photos.
    • No gratuitous or useless images. All images must be relevant.
    • All images created by others feature proper citations and credit links.
    • Videos and music does not autoplay.
    • No more than three videos on a web page.
    • Video plays on the page and does not force the visitor to go to another page.
  • Design Elements:
    • Familiar, easy-to-read fonts.
    • No more than 3 font styles on a web page, two is better.
    • No clutter. Every pixel counts.
    • Design complements content.
    • Consistency, in design, layout, content structure, and graphics.
    • None or few ads.
    • Colors are complementary, not clashing, and few, nor more than four colors to a web page.
    • Minimalism, a clean, open design with whitespace and no crowding of content.
  • Usability:
    • Navigation is immediately recognizable and easy to use.
    • Key navigation follows standardized forms and web standards.
    • Sidebars are clutter-free and everything in them is important and critical to the purpose of the site.
    • Visual hierarchy, navigation that shows us menus and submenus without clutter or confusion, and specific and related categories and subcategories.
    • No pop-ups or interstitials.
    • Loads fast.
    • Content loads first, then branding, then images.
    • Responsive and mobile friendly.
    • Familiar layout. You know where everything is and you don’t have to hunt for links to key information.
    • Designed to not make us think.
    • You know where you are and who you are with at all times.
  • Web Standards:
    • Legal policies are in place and easy to find.
    • Links open web pages. They do not force web pages to open in a new window or tab.
    • Links are in properly formed HTML structure for readability, not link dumps, pasted in links.
    • No autoplay anything or movement.
    • All downloadable material is clearly marked as what it is (PDF, MP3, DOC, etc.), with instructions on how to download it.
    • The About web page tells us what the site is about and who the author is, and why they are doing this.
    • The Contact web page features an easy-to-use contact form for connecting with the author, and there is not a single email address to be seen.
    • Compliance with web accessibility with clear and specific link anchor text, images with descriptions for the blind and visually impaired, and browser keyboard shortcuts for common navigation areas.

It’s a great list. Not complete, but organic. It really reflects many of the most desirable and hated elements in a web design.

Most Important Characteristics in Web Design

A few points the students fiercely debated are worth separate discussion from the list.

Room for the reader: There must be room for the reader. While harder to identify, the students agreed that anything that got between the reader and the website content had to go. That meant ads, interstitials (pop-ups), busy designs, too many colors, too many fonts, etc. Clutter and interference.

Harder to identify were the tiny things that get between a reader and the content, as well as the goals of the site. Many thought it was the lack of whitespace, resting places for the eyes and the reader’s thoughts compared to crowded content and designs. Others thought it was the details that mattered, the little things that lack consistency or become cluttered such as poorly pasted content from word processors, misspellings, grammar errors, not cleaning out comment spam, inconsistent use of headings, using bold for headings instead of the headings tag, forcing font styles and colors, too many bolds, too many italics, little things that add up to a message that says the reader isn’t paying attention to details and doesn’t care enough to keep their site clean and proud.

“Pride.” That word kept coming up as we dove deeper and deeper into what made a web design worthy. “It looks like they care enough to do their best,” a student explained. “If they care, we care. When we care, we feel a relationship with the blogger. When they care, we know they are thinking about us.”

Boring: The students realized that boring was better. All the glam, glitz, special fonts, bright colors, animated gifs, all the busy so many inexperienced web designers add to their site aren’t worth it. Keep it clean and simple, easy to read and easy to use.

People want information. They want entertainment. They want to read, watch, or listen. They don’t want to have their senses assaulted. To quote another student, “So keep the design boring, dude, and the content exciting.”

Blog Exercise Task from Lorelle on WordPress.Your blog exercise is to review this list, and possibly find your own lists on the web that clarify a well-designed site.

How does your site measure up?

If you are too close to your site, too vested in the design and layout, ask some friends to be honest. Or ask people you don’t know well to give you feedback. Show them the list and ask them to check off which elements apply and which don’t. Get feedback on how you are doing.

Every single one of these design elements and content considerations are choices. There are no requirements. But if a bunch of college students studying web development, design, and blogging are thinking these things, and other experts are offering this advice, shouldn’t you take it a bit seriously?

Make a list of the things you need to change on your site to make room for your readers and to keep it a bit boring.

You can find more Blog Exercises on . This is an ongoing challenge to help you flex your blogging muscles. You may join us at any time, but I recommend you take a moment to visit past blog exercises to help invigorate your site.


How to Avoid the New WordPress.com Interface

WordPress.com New Interface - Access to WP Admin.For the past three to four years, WordPress.com users have been “experimenting” with the what is known as the “new” WordPress.com interface. A drag-and-drop-meets-wysiwymg interface (What You See is What You MIGHT Get), it is designed to make interaction with WordPress easier. I’m still waiting.

What it continues to do is make my students and clients have fits of frustration, hair-tearing, and tears.

Let me be clear. I am not personally or professionally against improving the interface of WordPress called Calypso. It needs improvement. Unfortunately, during the development stage, the majority of work is done in the “classic” interface known today as the WP-Admin. People become familiar with it, trust it, and enjoy the simplicity once they learn a little of the lingo (what’s a Page, post, and media), yet, when they encounter the new interface, they are confused, frustrated, and lost.

Those starting to use WordPress need quick access to Themes, Widgets, Settings, Pages, etc., and the new interface, unless you are careful with what you click, may switch back and forth between the new and the classic interface seemingly without warning, causing no end of confusion. Once they get the site set up, the new post interface is “good enough” for them, as most of my students admit, though they rush back to the classic interface as soon as possible.

It makes no sense to them. It takes longer to load, doesn’t work well when not connected to the Internet, It might be a “clean” interface, but they can’t find categories, tags, post scheduling, preview links, and sticky post buttons without hunting around the screen. Younger and older people HATE the lack of contrast in the font and screen colors. If they are working near a window or in a bright light situation, they complain they can’t find their way around the screen because they can’t see it. Older people complain they get headaches working with it because it is so “dim” – their word not mine. If there was a higher contrast alternative, the complaints might be fewer.

Having met some of the designers behind the new interface, I understand their intentions and goals. I adore their passion and commitment to improving WordPress. I just wish they could wear Vaseline-coated glasses, work in brightly lit rooms, and approach WordPress from the perspective of someone having never seen it before.

Until then, I have to deal with frustrated clients and students, and you must know there are alternatives.

UPDATE: I’ve just been informed by a WordPress.com moderator that the WP-Admin link does not appear at the bottom of the My Sites menu for “new” users, only “old” users, which means that WordPress.com now offers different interfaces for the new and classic interface and the length of time you’ve been using the service. Makes no sense to me but I’ll be teaching a new batch of students in a few weeks, and we’ll see how they do.

Use the WP-ADMIN

The classic WordPress interface is now called WP-ADMIN.

To open it directly use example.com/wp-admin/.

I recommend you bookmark it and add it to your visible bookmark toolbar on your browser or memorize it. If you get lost, just type in wp-admin at the end of your URL and hit enter. AH, back to familiar lands.

To access it through the new interface:

  1. Click My Sites to access the dashboard screen or bring up the right side drop down menu.
  2. Scroll to the bottom of the right side menu. Look for WP Admin, and click.
  3. It will force open a new window or tab.
    • If your browser is set to switch immediately to a new tab or window, find the previous tab you were just on and close it.
    • If your browser is set to open new tabs and windows in the background, close this tab and switch to the newly opened tab.
    • If all this tab switching and forcing makes you crazy, and it does, right click on WP-Admin instead and choose to Open Link in New Tab.

Forcing links to open in a new tab without warning the user is a violation of web standards and international laws, but the small box with the arrow shooting out to the top right is a long-held standard indicator that a link will force open in a new tab or window.

Still, it is a useless thing to do and leaves people unfamiliar with how a browser and links work with multiple open WordPress interface tabs, which leaves them confused and lost, not knowing where they were when they switch away and come back. Personally and professionally, I believe the link to the WP-Admin should open in the same page. Those who wish to force open new tabs already know how to do so, so let them.

To avoid accessing the new interface, stick with the WP-Admin access and NEVER click the EDIT link on the front end of your site. It automatically redirects to the new interface now.

Also, ignore all nag screens that tell you to switch to the new interface. For a while, such a switch made it difficult to switch back to the classic edit interface, so don’t. Seriously. Don’t.

If all this tab-switching and clicking is too much work. There is an alternative.

Using a Browser Script

Browser scripts are bits of code that react when you visit a web page or site. They will not work on other sites unless programmed to do so. For example, there are browser scripts that stops autoplay of the most common videos. There are browser scripts that stop autoplay of music on websites that annoy us. There are also browser scripts for Gmail, Facebook, and more.

And for WordPress.

Among them is a script called WordPress.com edit post redirects that automatically redirects the new post edit interface to the classic when you click EDIT from the front end of the site (the design view that other people see).

To use the Edit Post Redirect, install Greasemonkey Add-on for Firefox or Greasy Fork Add-on for Chrome first. Restart your browser if necessary. Then install the WordPress edit post redirect. It will automatically install the one appropriate for your browser.

When you land on the new post edit interface, it will redirect automatically to the classic post interface. It is fairly instant for cable users, and takes a moment for dial-up Internet users.

For more specifics and step-by-step instructions, see “How To Force A Redirect To The Classic WordPress.com Editor Interface – Diary of Dennis.”

Be warned that you may have to reinstall the script from time to time as WordPress makes changes in their redirect process for the new interface.


WordPress School: Copyright Policy

Badge - Learn WordPress with Lorelle VanFossen at WordPress School.We’ve started our mini-series on adding policies to your WordPress site with some basic information and details on how to organize and structure policies on your site. It’s time to evaluate the five different policies featured on almost all websites regardless of topic or goals in Lorelle’s WordPress School free online course. Remember, we add policies to our site for quality control and information, letting our visitors know what our terms and conditions are, and where the liability and responsibility starts and stops.

The four policies I’ll be covering are Copyright, Disclosure, Privacy, and Comments. Today, we’re tackling copyright.

By international law, if you create something and it is in a fixed state, such as a printed book, recorded album, or web page, you own the copyright and may dictate how it is to be used. You do not need to display a copyright notice or have a copyright policy, not even a © to indicate the material is copyrighted. If it is original and you published it, it is your intellectual property and you have the right to determine how it may be used, or not. You own it.

You don’t need to register it. You don’t need to do anything, however, copyright policies and notices serve to remind others that this is your work and you have the right to control how it is used, and these are the parameters for usage. A well-written copyright policy states exactly how your content is to be used to allow for Fair Use, the ability to quote, cite, and link to your content without explicit permission.

Before we dive deeper into how copyright works and what to consider when writing your copyright policy, let’s take a moment to talk about where to put your copyright notice in WordPress, if you choose to use one.

Where to Put a Copyright Notice in WordPress

A copyright notice is the © 2016 Your Name statement. You could use the symbol or the word written out as Copyright 2016 Your Name. I highly recommend that you include a link around the notice to your copyright policy created on a WordPress Page on your site, created per the instructions on how to integrate policies into your WordPress site.

If you would like to ensure your copyright notice and the link to your copyright policy is on every web page of your site, put it in a Text Widget in the sidebar or footer.

If you would like to add your copyright notice to every web page within the content area, allowing the notice to go out with your site’s feed, save the HTML link to a text file on your computer and paste it into the bottom of each post before you publish it, or, if your site is self-hosted, used a WordPress Plugin that does this automatically.

If you have a strict copyright policy, or wish to add emphasis to your copyright policy, use a Text Widget placed in the sidebar or footer with a sentence or two that clearly specifies permitted use, with a link to your copyright policy Page for more specifics. Continue reading

WordPress School: Integrating Policies

Badge - Learn WordPress with Lorelle VanFossen at WordPress School.In this mini-series on adding policies to your WordPress site for Lorelle’s WordPress School free online course, we’re going to look at the technical decisions you need to make on how to integrate these policies. The next follow-up articles will discuss how to write and format each of the four policies we’ll cover in this course: Copyright, Disclosure, Privacy, and Comments.

There are two methods for integrating policies into WordPress, both using the WordPress Page content type.

  1. Single Page: If you do not have much to say or few policies, you may publish them on a single Page titled “Policies” or “Legal,” both web standard titles.
  2. Multiple Pages: If you have much to say or many policies, you may publish them on multiple Pages with a main Page titled “Policies” or “Legal” and each policy is a sub-Page.

Each of these techniques involve creating Pages in WordPress and linking information together for navigation within the Policies, excellent techniques for improving your intrasite linking and WordPress site structure and organization.

As your site grows, managing the content organization and structure becomes even more critical. It’s important to know the difference between posts and Pages, and how to choose which content type for publishing your content.

As Pages are only featured through the primary and other menu navigation areas, selecting the right length title, the order, and placement of Page content can get complicated with layers of drop down menus and limited real estate property on the menu bars in the WordPress Theme. Pages begin to compete with each other for space and the attention of the user, so take your time exploring how to add Pages to WordPress in these exercises to help you add other Page content as your site expands. Continue reading