wpsl_store_header_template

  1. Description
  2. Usage
  3. Changelog
  4. Source File

Description

This filter allows you to change the HTML structure of the store header.

Usage

Both examples wrap the store name in a h3 tag instead of the default strong tag.

If the store permalinks are enabled:

If the store permalinks are disabled:

The <% ... %> and <%= ... %> code is used by the Underscore library to execute JS code, and to print the correct JSON data when the HTML template is rendered.

If you use a h1-6 tag instead of the default strong tag, and you want to keep the HTML semantically correct, then you should move the header outside of the p tag that is wrapped around it.

You can see the HTML that is wrapped around the function that generates the store header on line 10 in the wpsl_listing_template code example.

Changelog

Since 2.0

Source File

This filter is located in /frontend/underscore-functions.php.

Placement

The code needs to be placed in the functions.php file inside your active theme folder.