Join Morten Rand-Hendriksen for an in-depth discussion in this video Build a basic component, part of WordPress: Building Progressive Themes with WP Rig.
- [Instructor] Let's start by wiring up … the core related post component. … In the exercise files for this movie, … you'll find I've added one new file … and made a tiny change to another core file in WP_Rig. … Under template-parts, content, you'll find entry_related, … a new file that contains what you see here. … It's just an h2 that gets output, and then an entry.php, … in the same folder. … Down below the article element, … I've added a new conditional statement … that says if we're on a single post, … then get the template part entry_related, … which is this one here. … So start a development process. … I'll now start up the actual development process, … npm run dev, and let it do its job … so we can see the output in the browser. … Once in the browser, I'll navigate to … a very short post so that I can see the output right away, … and here you see it down here. … Related post appears after the main post … but before the previous and next navigation. … That's roughly where I want it, I might move it later. …
- Setting up a WordPress theme development environment
- Installing WP Rig
- Building, activating, and testing a new progressive theme
- Editing CSS
- Using web fonts
- Editing existing templates
- Adding advanced features
- Translating a theme
Skill Level Beginner
WP Rig: A primer2m 5s
1. Configure a Development Environment for WP Rig
2. Install and Configure WP Rig
4. PHP and WordPress Templates
6. Extending WP Rig: A Practical Example
7. Going Further with WP Rig
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.