Skip to content

Using a Custom Template

Thomas Park edited this page Nov 21, 2015 · 5 revisions

Administrators can create a custom template that's applied Snowball articles instead of the active WordPress theme or Snowball's opinionated template. The best way to get started is to copy Snowball's template and modify it.

1. Copy the Template

Copy the template at /wp-content/plugins/snowball/inc/snowball-template-theme.php and move it to /wp-uploads/snowball/.

If /wp-uploads/ doesn't have a snowball folder yet, create it first. The file must be named snowball-template-theme.php.

2. Modify the Template

Modify the template. It's recommended that you don't change the core of this file, but you may wish to add your own header and footer. You can also add custom stylesheets and scripts, or remove snowball-theme.min.css.

If the file you wish to add is also located in wp-uploads/snowball/, you can link to it with the following lines of code:

<link rel="stylesheet" href="<?php echo wp_upload_dir()['baseurl']; ?>/snowball/custom.css">

<script src="<?php echo wp_upload_dir()['baseurl']; ?>/snowball/script.js"></script>

3. Enable the "Use Snowball theme" option

Make sure that the "Use Snowball theme" option is checked within an article to apply your custom template instead of the general WordPress theme.

Clone this wiki locally