The Bookshelf Instructions Guide

Thank you for purchasing The Bookshelf Drop-in! This brief document will show you how to install this Drop-in into your own MD child theme.

Watch the video below and use the written instructions after the video for a clear guide on what to copy/paste into your child theme:

NOTE: All MD Drop-ins require a minimum version of Marketers Delight 4.5.2. Please make sure your site is safely running this version before doing anything with Drop-in files.

Step 1: Initialize the MD Library in your Child Theme (skip if already done)

Since Drop-ins reuse tools that already come with Marketers Delight, we need to ensure the MD library is properly loading in our Child Theme.

Due to the order in which WordPress loads files (child theme loads before the main MD theme) we need to load the MD library into the child theme ourselves with this simple line of code in the functions.php file:

require_once( get_template_directory() . '/lib/marketers-delight.php' );

If you use the Starter MD Child Theme (download from your account), this line has already been added and your child theme is Drop-in ready.

Initialize the MD Library

Step 2: Upload The Bookshelf File

After you download the bookshelf.zip file from your account, unzip it and upload the bookshelf.php file to your child theme directory.

(There are 2 files in the download, we’ll use the disposable bookshelf.css in step 4)

To keep your child theme organized, I recommend you create a new folder called ‘dropins’ and put those files in there. It’s important you remember where you uploaded the Drop-in file to for your next step.

Upload Drop-in file to child theme

Step 3: Load The Bookshelf File to Your Site

With the MD library initialized and The Bookshelf file uploaded, there’s only one more step: load the file!

Back in your child theme’s functions.php file, paste this simple include statement AFTER the MD library call:

include_once( get_stylesheet_directory() . '/dropins/bookshelf.php' );

IMPORTANT: Depending on where you uploaded the bookshelf file, you may need to change the path above so your site knows where the file is. If you created a “dropins” folder in your child theme, the above code will work as-is.

Save and upload the file, and there’s only one last *simple* step to go!

Include the bookshelf drop-in file

Step 4: Copy the Bookshelf CSS to your style.css file

The Bookshelf needs some extra styling that doesn’t come with Marketers Delight, so you can now open up (not upload) the second file that came with the Bookshelf download, bookshelf.css and paste the CSS code into your Child Theme’s style.css file.

For simplicity sake you can paste it at the end of the file, or anywhere that makes sense if you like to keep this file organized.

Step 5: Resave Your Permalinks to Flush Your Site’s Cache

Since The Bookshelf adds a custom post type, in order to show the newly generated bookshelf page, we have to flush our site’s permalinks. Luckily this is the easiest step!

Login to your Dashboard and go to Settings > Permalinks and simply click the “Save Changes” button at the bottom of the page.

You can now begin adding books to your site!