@ -11,11 +11,13 @@ This is the folder structure for a standard theme. The root folder shown below
* contact.php
* _default.php_
* _404.php_
* preview.png
* ***colors***
* ***default***
* **green**
* **etc**
If `preview.png` is present, it will be displayed to the user in the theme picker.
## Metadata File
@ -81,9 +83,9 @@ It is highly recommended to have a contact form template included in your theme.
Do not use the optional `<html>`, `<head>`, and `<body>` tags for your template HTML. The editor relies on being able to append code to the document and have it still work normally.
Do include FontAwesome 5 in your theme. The SiteWriter editor allows the user to pick icons from the FontAwesome Free icon set to enhance their content.
Do include FontAwesome 5 in your theme. The SiteWriter editor allows the user to pick icons from the FontAwesome Free icon set to enhance their content. Use `get_fontawesome_js()` or `get_fontawesome_css()` instead of including FontAwesome in your theme. It saves space and ensures that all themes have the latest version of FontAwesome.
Do include company info (business name, phone number, address, and email) and social media links (Facebook, Twitter, YouTube, Mastodon, etc) in the theme. These can be setup in the sitewide settings, and users will expect themes to make use of this information.
Do include company info (business name, phone number, address, and email), social media links (Facebook, Twitter, YouTube, Mastodon, etc), and footer links in the theme. These can be setup in the sitewide settings, and users will expect themes to make use of this information. See the Code Snippets section below for examples of this.
Do include `<?php get_header(); ?>` and `<?php get_footer(); ?>` snippets in your templates. They are used to inject additional content into the template, such as third-party analytics code.
@ -110,7 +112,7 @@ Below is a minimal functional `default` template that fulfills the above require
Take $text, format it according to $type, replace [[CONTENT]] in $template with it, and replace [[TITLE]] with $title (or the unchanged $text if $title is null)
$type may be one of the following: <ul><li>`SPECIAL_TYPE_PHONE`: `tel:1234567890`</li><li>`SPECIAL_TYPE_EMAIL`: `mailto:address@example.com`</li><li>`SPECIAL_TYPE_LINEBREAKS`: Replaces `\n` with `<br />\n`</li><li>`SPECIAL_TYPE_ADDRESS`: Creates a link to open Google Maps, and runs LINEBREAKS on $title</li><li>`SPECIAL_TYPE_NONE`: Does no text manipulation.</li></ul>
* **Parameters:**
* `$text` — `string` —
* `$type` — `int` —
* `$template` — `string` —
* `$title` — `string` —
* `$echo` — `boolean` — default true
* `$conditional` — `boolean` — Act as output_conditional() and not return anything if $text is empty