How to add demo content in WordPress
Description
Have you wanted to test features of WordPress, or even within a plugin or theme but needed demo or dummy content? Demo content includes posts with nearly every variety of formatting, including various types of blocks, images, and more. The Themes team leads the way with resources used when evaluating theme submissions to the repository.
Objectives
- Beginners will identify and apply demo content.
- Beginners can evaluate needed demo content.
- Beginners can implement demo content when developing training materials and reference documentation.
Prerequisite Skills
Participants will get the most from this lesson if they have familiarity with:
- Importing files into WordPress
- Using WordPress as a content creator
Readiness Questions
- Are you testing new features of plugins, themes, or WordPress itself?
- Are you creating training or reference materials?
Materials Needed
- Use the Theme Unit Test Data and/or Gutenberg Test Data to create demonstration content on the site.
- For other demo data, check out FakerPress.
- Photos from the WordPress Photos directory.
- For general image placeholders, PlaceKitten works well.
- MonsterWidget can help test widgets.
Notes for the Presenter
- An online connection is ideal for this lesson. Importing content depends upon an internet connection.
- If you need to present this lesson offline, consider exporting an XML file (Tools > Export) in a local developer environment of WordPress and demonstrating on the same local environment how to import this file.
Lesson Outline
- Talk about when you might want to have demo content. Ask what impression participants had when the demo content was not human readable language, but rather lorem ipsum text.
- Discuss the many types of content types and layouts needed when demonstrating what WordPress can do.
- Demonstrate how to save raw XML files from GitHub raw view in the browser.
- Demonstrate how to use the WordPress Importer.
- Discuss how the XML file is a set of directions for one website to import content hosted elsewhere. The XML file does not contain the data, but rather directions on how to fetch the data.
Exercises
Import Theme Unit Test Data
- Download demo content
- Import the demo content into your own site
- Use the demo content to take screenshots
Assessment
Lorem Ipsum content is sufficient
- True
- False
Answer: 2. False
We can use FakerPress as needed
- True
- False
Answer: 2. True
Which teams maintain demo content?
- Themes
- Gutenberg
- Both
Answer: 3. Both
Additional Resources
- Theme Review Team may have additional resources for demo content.
Example Lesson
Whether you are testing features of a plugin, theme, or WordPress, or creating training material, you’ve likely needed demo or dummy content. It can save you considerable time, as you won’t need to create fake posts or gather images to test the feature.
Thankfully, the Themes team and Gutenberg contributors have created files for this purpose.
How to import content
Go to your local WordPress site at Tools > Import. You may need to install the importer plugin