# Installation
This guide is mainly written for people who never had their own WordPress site before and may not have the skills to figure this out by themselves. Feel free to skip ahead. That being said, there are still some parts of interest for veterans in regards to the theme.
### Table of Contents
* [Choosing a Host](#choosing-a-host)
* [Installing WordPress](#installing-wordpress)
* [Configuring WordPress](#configuring-wordpress)
* [Securing WordPress](#securing-wordpress)
* [Legal Considerations](#legal-considerations)
* [How to Install/Update the Fictioneer Theme](#how-to-installupdate-the-fictioneer-theme)
* [Updating the Theme](#updating-the-theme)
* [Optional: Install Plugin Dependencies](#optional-install-plugin-dependencies)
* [Optional: Additional Plugins](#optional-additional-plugins)
* [Optional: Caching](#optional-caching)
* [Warning: SEO Plugins](#warning-seo-plugins)
* [Warning: CSS Minification/Combination](#warning-css-minificationcombination)
* [How to Configure the Fictioneer Theme](#how-to-configure-the-fictioneer-theme)
* [General Tab](#general-tab)
* [Roles Tab](#roles-tab)
* [Connections Tab](#connections-tab)
* [Phrases Tab](#phrases-tab)
* [ePUBs Tab](#epubs-tab)
* [SEO Tab](#seo-tab)
* [Tools Tab](#tools-tab)
* [Log Tab](#log)
* [How to Customize the Fictioneer Theme](#how-to-customize-the-fictioneer-theme)
* [Move the Title/Logo](#move-the-titlelogo)
* [Minimum/Maximum Values](#minimummaximum-values)
* [Menus](#menus)
* [Constants](#constants)
## Choosing a Host
First, you need to choose a host for your site, the place where your site "lives". This may very well be the hardest part, because bad choices are annoying to fix and cost money. For that matter, you are encouraged to do your own research — [Online Media Masters](https://onlinemediamasters.com/) is a good place to start. If you feel completely lost, asking for help is entirely justified.
Your choice will ultimately come down to two schools: managed hosting or not. Managed hosting takes away the burden of having to, well, manage your server. Configuration, maintenance, security, and performance issues are covered by the provider — at a price. For example, on [WordPress.com](https://wordpress.com/pricing/) you would need at least the Business plan to use the Fictioneer theme. Non-managed hosting is more affordable and less restrictive, but you need a bit of technical know-how or someone helping you.
If the hosting cost are too much for you alone, there is also the option to share a site with other authors and split the bill. Typically with the administrator holding the contract. Just make sure you trust everyone and write down the obligations and rights of all participants involved. Always prepare for the fallout.
## Installing WordPress
The installation process for WordPress is [documented on the official site](https://wordpress.org/support/article/how-to-install-wordpress/) and in many guides only a quick search away. Nowadays, most hosts offer a one-click installation service as well. Note that the latter often comes with pre-installed plugins that you may want to get rid of, especially analytics plugins which tend to violate data privacy laws.
Fictioneer is best used on a fresh install due to its complexity and possible conflicts with existing plugins or customizations. Which does not mean you cannot switch or migrate, but it would be an ordeal. For example, Fictioneer has custom post types for stories and chapters, so you would need to either [convert existing posts](https://wordpress.org/plugins/post-type-switcher/) or upload them anew (which would disassociate all comments). They also have several additional settings, making automatic conversion scripts risky. Depending on how many posts you have, this may take a while.
### Configuring WordPress
Everything installed? Head to **[Settings](https://wordpress.org/support/article/administration-screens/#general)** in the admin panel to configure your site. You can follow a guide, but this should all be fairly obvious. For the purpose of working with the theme, you are most interested in the **Reading**, **Discussion**, and **Permalinks** submenus.
* **Reading:** If you want a static page like in the demo, you can set this here. Of course, you need to [create the pages](https://wordpress.org/support/article/pages/) for blog and front page first. Best use the “No Title Page” template. Keep the number of blog posts and feed items somewhere between 8 and 20.
* **Discussion:** Most of this is up to you, but the number and order of comments does not necessarily behave as you would expect. Comments are always nested in the theme, regardless of the checkbox, but the depth is honored and should be anywhere up to 5. Break comments into pages with 8 to 50 comments each, the first page being displayed by default, and newer comments at the top. The theme really does not work well with anything else but you are welcome to try.
* **Disallowed Comment Keys:** For simple yet reliable comment spam protection, you are advised to use the [compiled disallow list by slorp](https://github.com/splorp/wordpress-comment-blacklist). Just copy the content of the blacklist into the [Disallowed Comment Key](https://wordpress.org/support/article/comment-moderation/#comment-blocking) field. Check your comment trash occasionally as this can lead to false positives. You can search for less restrictive lists too.
* **Permalinks:** You want the permalink structure set to "Post name". As an off-note, whenever some pages do not show up even though they clearly should, come back here and save to update the permalink structure. You would be surprised how many issues that solves.
* **Open Graph Default Image:** Only used when you enable the SEO features and no (known) SEP plugin is running. This image will be shown in search engine results and social media embeds if no other image is provided by individual posts, such as story cover images. Can be set under **Appearance > Customize > Site Identity**.
* **Author websites:** Technically not a required setting, but authors may want to fill out the website field in their profile. These are added as Open Graph author meta tags used by search engines and social media embeds. If left blank, the generated author page of the site will be used instead, which might be what you want anyway.
### Securing WordPress
You can greatly improve your site security and performance by adding policies to the **.htaccess** file located in the WordPress root directory. Managed hosting plans normally do this for you. Make a backup and add the following lines anywhere before `# BEGIN WordPress` or after `# END WordPress`. If something goes wrong wrong, just remove everything again or restore the backup. You can also use a (cache) plugin. This is just the basics, far more is possible but please refer to a proper guide.
Follow the official guide to set up your Cloudinary account and the plugin. You do not need to "register" the CND with other optimization or cache plugins — it will just work.  To keep things orderly, use a folder name that relates to your site. Cloudflare can be problematic if you want to capitalize on the "Cache Everything" option because without a paid plan, you cannot make exceptions for logged-in users. This means visitors might see personalized content of the first user to populate the cache — not good! Imagine your account details being leaked like that. It also does not easily cooperate with on-site caching solutions. That being said, the free tier can be persuaded! Ditch the official plugin and install Super Page Cache for Cloudflare instead. Same as before, refer to proper guides. Make sure you have the following settings and be prepared that it might still not work! Test this! Optional: Install WP Super Cache with the extreme settings. Cannot wrongly cache dynamic pages if there are none! Fictioneer does not have a frontend login form and the login page is not recommended for subscribers, so hiding it serves as additional security layer. Note that the optional OAuth 2.0 authentication system via Discord, Google, etc. is not affected by these plugins. There is not much to screw up, but you should refer to a proper guide for your own peace of mind. Because Sucuri has a tendency to be overzealous with scary warnings and until you set up a whitelist, you will see many false positives. Better safe than sorry. To quote the plugin’s own premonition: "The day may come when you get hacked, when something goes wrong with an update, your server crashes or your hosting company goes bust — without good backups, you lose everything." The free version is perfectly adequate, allowing you to schedule daily backups saved directly to a remote destination of your choice. As a matter of fact, you do not need this kind of plugin at all if you pay a modicum of attention to the images you upload. One of the most common yet easy to fix mistakes is uploading over-sized images. Obviously, if your header image is 20 MB, your loading time will go down the drain. Your site will be even faster without the overhead of this plugin if you just pre-optimize your images. This is the "safest" advanced setup in the regard that you do not need to mess with server files. Expert mode is a tick faster and not actually complicated, but if the terms ".htaccess" and "mod_rewrite" make you feel queasy, you are perfectly fine with simple mode. This is the most "aggressive" setup meant to carry membership sites on cheaper hosts, e.g. sites with many simultaneous requests by logged-in visitors who would normally not be served supercached files. Generating individual pages in large numbers within a short amount of time can overwhelm a server, leading to timeout errors. An issue you are unlikely to encounter as long as you do not have thousands of daily visitors. But in that case, just extend the recommended settings with the following ones. As long as you only serve cached pages to unauthenticated users, you can hardly do wrong. To make absolutely sure everything works, please add the following exceptions under Performance > Page Cache. LiteSpeed Cache offers you far more than what is covered here, so please refer to more comprehensive guides if you want to take advantage of that. However, combined with the other recommended plugins, you can do without.Example Policies
```
# === BEGIN FICTIONEER ===
# Disable directory browsing
Options -Indexes
# Deny POST requests using HTTP 1.0
Example settings
Assume missing options are off, empty, or left to default.
[JS, CSS & HTML] JavaScript Options:
[JS, CSS & HTML] CSS Options:
[JS, CSS & HTML] Misc Options:
[Extra] Extra Auto-Optimizations:
Example settings
Assume missing options are off, empty, or left to default.
[General settings] Media Library Sync Settings:
[General settings] Cloudinary folder path:
[General settings] Storage:
[Image settings] Image optimization:
[Lazy loading] Lazy loading:
[Responsive images] Breakpoints:
Cache considerations
[Plugin: Cache] Don't cache the following dynamic contents:
[Plugin: Cache] Prevent the following URIs to be cached:
 Append to defaults. The "account" and "bookshelf" URI fragments may differ on your site (since you can name them).
 /oauth2*
 /download-epub*
 /account*
 /bookshelf*
 /*commentcode=*
[Fictioneer: General] Page Assignments:
[Fictioneer: General] Comments:
[Fictioneer: General] Security & Privacy:
[Fictioneer: General] Compatibility:
User authentication
Notes
Typical false positives:
 error_log-* (potentially any log from any plugin)
 .htaccess.bk (generated backup of .htaccess)
Why you want backups
Example settings
Follow the initial setup guide, then head to Settings > EWWW Image Optimizer to review the settings. Also take a look at the official documentation. Assume missing options are off, empty, or left to default.
Basic settings:
Recommended settings
Assume missing options are off, empty, or left to default.
[Advanced] Caching:
[Advanced] Cache Delivery Method:
[Advanced] Miscellaneous:
[Advanced] Advanced:
[Advanced] Expiry Time & Garbage Collection:
[Advanced] Accepted Filenames & Rejected URIs:
[Advanced] Rejected URL Strings:
 The "account" and "bookshelf" URI fragments may differ on your site (since you can name them).
 /oauth2
 /download-epub
 /account
 /bookshelf
Extreme settings
Assume missing options are off, empty, or left to default.
[Advanced] Miscellaneous:
Great, now your site is broken for logged-in users! Or rather, they are treated like guests and cannot see their personal content or post comments anymore. To resolve this, head to the Fictioneer general settings and activate the following options. Clear the cache afterwards. Yes, the admin bar is now gone. Yes, you can still get into the admin with the …/wp-admin
link. No, password protected posts no longer work.
[General] Page Assignments:
[General] Security & Privacy:
[General] Compatibility:
Cache exceptions
[Page Cache] Never cache the following pages:
 The "account" and "bookshelf" URI fragments may differ on your site (since you can name them).
 /oauth2*
 /download-epub*
 /account*
 /bookshelf*
Example settings
Assume missing options are off, empty, or left to default.
[1 - Cache] Cache Control Settings:
[2 - TTL] TTL:
[3 - Purge] Purge Settings:
[4 - Excludes] Do Not Cache URIs:
 The "account" and "bookshelf" URI fragments may differ on your site (since you can name them).
 /oauth2
 /download-epub
 /account
 /bookshelf
[4 - Excludes] Do Not Cache Query Strings:
 commentcode
[4 - Excludes] Do Not Cache Roles:
[5 - ESI] ESI Settings:
[5 - ESI] ESI Nonces:
 oauth_nonce
 fictioneer_nonce
 fictioneer-ajax-nonce
[5 - ESI] Vary Group:
[7 - Browser] Browser Cache Settings:

### Roles Tab
The integrated role manager to add and, edit, and remove roles. Not the most sophisticated compared to dedicated plugins, but it comes with custom capabilities tailored to the theme. Because Fictioneer offers some powerful options and tools you may want to keep away from certain user groups. If the roles have not been properly initialized when you activated the theme, you can do that under the **Tools** tab. For reference, look at the default [WordPress capabilities](https://wordpress.org/documentation/article/roles-and-capabilities/).
New Capabilities
* **Shortcodes:** Without this capability, shortcodes are stripped when you save a post.
* **Select Page Template:** You cannot change the page template without this.
* **Custom Page CSS:** Inject CSS into the header for an unique style. Dangerous!
* **Custom ePUB CSS:** Inject CSS into the ePUB for an unique style. Dangerous!
* **SEO Meta:** Show and edit the SEO meta for posts (if enabled in the settings).
* **Make Sticky:** You can make posts and stories stick to the top in lists.
* **Edit Permalink:** Customize the permalink slug derived from the title. Dangerous!
* **All Blocks:** Your block options are quite limited without this, for *sanity* reasons.
* **Story Pages:** Allows you to attach up to four pages to your stories as extra tabs.
* **Edit Date:** Makes it possible to change the publishing date *after* publishing.
* **Reduced Profile:** Removes clutter from the admin profile page, like the color schemes.
* **Edit Only Others Comments:** Limits moderators to only editing comments, not all posts.
* **Upload Limit:** Enforce the file size limit from the General Settings.
* **Upload Restrictions:** Enforce the file type restrictions from the General Settings.
* **Adminbar Access:** Overrides individual settings to show or hide the adminbar.
* **Admin Panel Access:** Required to access the admin panel, including your admin profile.
* **Dashboard Access:** Required if you want to see the dashboard admin page.
* **Show Badge:** Shows the role name as comment badge. Can be overridden in your profile.
* **Upload Files:** Grants permission to upload files in the media manager.
* **Edit Files:** Grants permission to edit or delete your uploaded files.
* **Allow Self Delete:** Allows you to delete your own account. Default for subscribers.
* **Privacy Clearance:** Grants access to sensible data like emails and IP addresses.
* **Read Others Files:** Allows you to see uploaded files from *other* users.
* **Edit Others Files:** Allows you to edit uploaded files from *other* users.
* **Delete Others Files:** Allows you to delete uploaded files from *other* users.
* **Manage {Taxonomy}:** Lets you see the overview list table of the taxonomy.
* **Assign {Taxonomy}:** Lets you assign the taxonomy to your posts.
* **Edit {Taxonomy}:** Lets you create and edit taxonomies of this type.
* **Delete {Taxonomy}:** Lets you delete taxonomies of this type.

### Connections Tab
Anything that connects with external service providers goes here, such as the Client ID and Secret for OAuth 2.0 applications. Please refer to respective tutorials on how to set them up and always, *always* keep those credentials confidential. If you enter a [Discord webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) here, notifications about new comments will be sent directly into a channel on your server (leave free if you do not want that). This should be a hidden moderation channel because it will receive excerpts of private comments.
* [Discord Developer Portal](https://discord.com/developers/docs/topics/oauth2)
* [Twitch Developer Portal](https://dev.twitch.tv/docs/authentication/register-app)
* [Patreon Developer Portal](https://docs.patreon.com/#oauth)
* [Google Developer Portal](https://developers.google.com/identity/protocols/oauth2)
The OAuth request redirect URI should be akin to `https://your-domain.com/oauth2`, the important part being the `/oauth2` endpoint. Note that the service providers can be picky, such as rejecting an URI that includes "www" if that is not actually part of your website’s address. Use the _exact_ string you see in your browser’s address bar.

### Phrases Tab
Allows for some minor translations and changes, such as the cookie notice banner or comment reply notification email. More customization can be achieved with the theme’s [translation filter](FILTERS.md#apply_filters-fictioneer_filter_translations-strings-). But if you want to translate the theme into a new language, you will need to include the proper [translation files](https://developer.wordpress.org/plugins/internationalization/localization/) or use a plugin.

### ePUBs Tab
Lists all generated ePUBs with statistics, download links, and options to delete them. File names are equal to the story’s `post_name`, which is the slug inside the permalink and *not* the title. They are cleaned of any special characters and are also used to query associated stories. If you change the permalink, they will no longer match and a new ePUB will be generated, leaving the old one orphaned. This is not terrible but takes up space.
**Failed ePUBs:** Indicated by an empty "download" file. The generation of ePUBs can fail due to several circumstances, such as missing writing permissions along the path of `wp-content/uploads/epubs` or non-conform content in the story or chapters. Unfortunately, ePUBs are rather picky regarding allowed HTML and while the converter tries to sanitize the content, this is not fail-proof. Alternatively, you can just upload a file yourself instead of relying on the converter, not limited to the ePUB format.
### SEO Tab
Only available if you enable the SEO features and no (known) SEO plugin is running. Lists all generated Open Graph meta data and schemas used by search engines and social media embeds, created and cached when a post is first visited until modified or purged. Whether these services actually display the offered data is entirely up to them. You cannot force Google to show your custom description, for example. After all, you could write *anything* in there. This tab is mostly informative, but you can purge the cached meta data or schemas if that should become necessary.
If you want to set up a default Open Graph image for search engine results and embeds, you can do that in the **Customizer** under **Site Identity**. This image will always be used if there is not a more specific one, like the thumbnail for posts.
### Tools Tab
A collection of actions to add, update, revert, fix, or purge certain items. For example, you can add a proper moderator role if missing or convert tags into genres. Everything is thoroughly explained. But the only action you will most likely need more than once is **Purge Story Data Caches**, which should be done whenever you change chapter or story settings.
If the user roles lack permissions, such as authors not being able to add stories and chapters, use the **Initialize Roles** action. This also restores the defaults if you mess something up, although it will not reset capabilities outside the theme’s scope. Most administrative capabilities are left untouched for security reasons.
### Log
A log of administrative actions performed which concern the theme.
## How to Customize the Fictioneer Theme

There are two ways to customize the theme. The obvious one is the Customizer of WordPress under **Appearance > Customize**. Here you can upload a header image and logo, set a site title, change the color scheme, and modify the layout to some extend. The interface and live preview make this straightforward. If the color options are too demanding (and they are), you may want to stick to the hue, saturation, and lightness sliders. Also consult the many guides about WordPress customization.
The second way is to directly modify the templates, styles, and scripts. This is indefinitely more powerful but requires some developer skills — and you can easily break your site. The theme’s files can be modified under **Appearance > Theme File Editor**, although you should never actually do this. Always create a [child theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/) because any code changes you make, regardless of quality, will be overwritten again when you update the theme.
### Move the Title/Logo

In order to move the title or logo, you need a bit of custom CSS. This can be added directly under **Customize > Additional CSS**. Depending on whether you have a logo or not, you will have one of the following HTML/CSS combinations (and then some, but this is the relevant part).
What you are interested in are the `position`, `transform`, and/or `text-align` properties. `transform` changes the origin point (kinda) of the element, which is normally the top-left corner, so that it can be better offset. The `text-align` only works on the title. If you overwrite those values, you can move the element or text around. If you want to offset from the right or bottom, you need to add `top: unset;` or `left: unset;` or both. Make sure the title or logo still fits on mobile. See references for [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position), [transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform), and [text-align](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align).
HTML | CSS |
---|---|
```html | ``````css .header__title { position: relative; top: 40%; /* ... */ transform: translateY(-50%); /* ... */ } ``` |
```html | ``````css .header__logo { position: absolute; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0); /* ... */ } ``` |