
The video is part of the full course
In this lesson you will
- Plan the pages, products and settings
- Build the site with a child theme and plugins
- Set up products, payments and shipping
- Test and launch
Build a small shop for a business you know, using everything in this course. Sunrise Bakery is your reference: the child theme, the opening-hours plugin, the shop tweaks plugin and the seeded store are all in the lesson files.
Requirements
- WordPress installed with correct time zone, Post name permalinks and no sample content.
- Users with the lowest roles they need, updates current, backups tested.
- A child theme with your brand colours in theme.json.
- Home, About, Contact and policy pages built with blocks and at least one pattern.
- A small plugin of your own with a shortcode or a hook, escaping its output.
- At least five products, including one variable product, in two or more categories.
- Cash on delivery or a gateway in test mode, and shipping zones for your area.
- Test orders processed through to Completed, and the launch checklist done.
/**
* [sunrise_hours] shortcode handler. Shortcodes must return their HTML, not echo it.
*
* @param array $atts Shortcode attributes, e.g. [sunrise_hours title="When to visit"].
* @return string
*/
function sunrise_hours_shortcode( $atts ) {
$atts = shortcode_atts(
array( 'title' => __( 'Opening hours', 'sunrise-hours' ) ),
$atts,
'sunrise_hours'
);
$days = array( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' );
$schedule = sunrise_hours_schedule();
$open = sunrise_hours_is_open();
$html = '<div class="sunrise-hours">';
$html .= '<h3>' . esc_html( $atts['title'] ) . '</h3>';
$html .= '<p class="sunrise-hours__status">' . esc_html( $open ? __( 'Open now', 'sunrise-hours' ) : __( 'Closed right now', 'sunrise-hours' ) ) . '</p>';
$html .= '<ul>';
foreach ( array( 1, 2, 3, 4, 5, 6, 0 ) as $d ) {
$hours = empty( $schedule[ $d ] ) ? __( 'Closed', 'sunrise-hours' ) : $schedule[ $d ][0] . '–' . $schedule[ $d ][1];
$html .= '<li>' . esc_html( $days[ $d ] . ': ' . $hours ) . '</li>';
}
$html .= '</ul></div>';
return $html;
}
add_action(
'init',
function () {
add_shortcode( 'sunrise_hours', 'sunrise_hours_shortcode' );
}
);Continue with the full course
The rest of this lesson, the narrated video, the PDF and the exercise are part of WordPress and WooCommerce. One payment, lifetime access.
Buy the course$39.00
Already bought it? Sign in with the email you paid with.
