How to Install Dropins to Your MD Child Theme
By following this guide you will learn how to install any MD Dropin to your child theme in a few simple steps. Installing Dropins requires basic experience with FTP program and easy to understand PHP code.
The nature of Dropins is to be fully open to customization as they live in your child theme—the same place you are to put all of your custom code snippets.
Dropins do not receive auto updates but may get updates over time with new features and bug fixes. If you decide to update, you will have to manually update the Dropin files in your child theme, so be aware of that when making the decision to make any code changes.
Basic instructions will be provided to help ease the update process for you, and support is always available to active license holders at the MD Forums.
Once installed, a Dropin will be fully feature enabled and you will not have to write any further code to make use of its functionality. From there you can customize it in any way you choose to add your own custom features and preferences.
Dropin Installation Instructions
Official MD Dropins are built in a standard way to help make installation and usage as streamlined for you as possible. This guide will show you how to install any Dropin to your child theme. Refer back to this guide for any Dropin you want to install later.
Step 1: Download and Unzip Dropin File From the MD Dropins Directory
For this example we will use the popular Testimonials Dropin. Even though these instructions are written for the Testimonials Dropin, they are still relevant to all other official MD Dropins.
Each Dropin is a tiny .zip file so all you have to do is go to the Dropin page and click the “Download” button to get the .zip file. Please note you must be logged in to your MD account and you must also have an active license key to download these files.
After you download the .zip file from the Dropin page, unzip the file so you can access the Dropin folder. In the next step you will manually upload the unzipped folder to your MD child theme.
Step 2: Upload Dropin Folder to MD Child Theme via FTP
This step assumes you have two things already setup:
- You have FTP login details to your server and access to the WP themes folder
- You have installed and activated the MD Child Theme
More comprehensive guides will be published about these two topics on the MD blog, but you can do a quick Google search to find out how to setup FTP details to your website if you are unsure of this step.
Now that you have unzipped the Dropin file, login to your site’s FTP and navigate to root_directory/wp-content/themes/my-child-theme/dropins/. The /dropins/ folder is where you will upload the Dropin folder you just downloaded.
If you do not yet have a dropins folder in your child theme, it is recommended you create one to make this guide easier to follow. If you are a more advanced developer with your own file organization preference, you may upload Dropin files anywhere you choose in your child theme directory.
After uploading the unzipped Dropin folder (in this case the testimonials folder) your child theme path should look similar to the screenshot below:
To be clear, the directory path for the Testimonials Dropin will be as follows:
Once the Dropin folder is successfully uploaded to your Child Theme and you are aware of the directory path you can move on to step 3:
Step 3: Activate the Dropin From Your functions.php file
You are almost done! Simply uploading the Dropin folder won’t activate it to your site, now you have to tell MD to load these new files you just uploaded. Luckily that is easy to do from your child theme’s functions.php file.
Open that file, which is located in your child theme’s root directory, and paste a simple include() statement towards the top of the file, right after the MD library is loaded:
include( 'dropins/testimonials/testimonials.php' );
It’s as simple as it gets! By using the PHP include() function you can load the custom Dropin into your WordPress environment with a single line in the functions.php file.
Since functions.php is at the root of your child theme you can simply write in the exact path to the main Dropin file and the include statement will know to look for that file within your child theme.
Note: if you uploaded the Dropin to a directory other than the /dropins/ folder, make sure you adjust the file path accordingly.
Once you have added the include() statement with the correct path, save and upload the file and the file installation process is complete!
Step 4: Save MD Settings
This step will be optional about half of the time you install Dropins, but I am including it here to be thorough and save you from wasting time. After you complete the first three steps, I recommend you go to WP Admin > Marketers Delight > Save to resave your admin settings.
The reason you want to do this is because saving the MD settings runs a few extra utilities that may be needed for all of the Dropin features to really “settle in” to your website.
For instance, any time a new custom post type is added to WordPress your site’s permalinks need to be flushed so the pages you create don’t show a 404 error.
Some Dropins also add their own CSS, and rather than piling on the HTTP requests and loading separate files, MD Dropins hook their own CSS into the single Marketers Delight stylesheet file. For these styles to show up after installation, MD’s stylesheet needs to be recompiled.
Since flushing permalinks and recompiling your site’s CSS can be pretty common actions you need to take, MD runs these actions for you every time you save the settings in WP Admin > Marketers Delight > Save.
So if you find the Dropin you just installed doesn’t look quite right, go resave your MD settings to run these important utilities to help solve the problem!
Possible Extra Steps and Notes
For most Dropins, this simple installation process is all you need to follow to activate on your site. If further instructions are required for installation, they will be noted on each Dropin download page.
To ensure the Dropin has successfully installed, refresh your website on the frontend and admin panel to ensure the intended functionality has made it on your website safely.
Be sure to read through the notes below to get a full understanding of Dropins and what their place is on your website.
Do Dropins Receive Updates?
As stated at the beginning of this guide, Dropins do not receive automatic updates like the Marketers Delight theme does and may rarely, if ever get updated. If they do, the responsibility is on you to read the release note and manually upgrade the Dropin, which is basically repeating the installation process by uploading and overwriting the new the Dropin files over the old files.
Even though Dropins are made for you to fully edit and change the code, you will need to be careful about overwriting the files as you will lose your changes. Dropins are developed to be as stable as possible and will rarely get feature updates, and basic instructions and support will be available to help you if you have questions.
Why Use Dropins?
Dropins are intended to add powerful functionality to your website that may be too experimental or specific to release in the main Marketers Delight theme. All Dropins are released as stable and will be maintained as MD continues to get updates.
Dropins also serve as a powerful example of how you can use the MD API to extend WordPress with your own custom features and admin interfaces, and organize them into your child theme with the same philosophy that goes into building each feature in the Marketers Delight theme.
How Do I Make My Own Dropins?
The best way to start creating your own Dropins is to start with an existing Dropin and reverse engineer it to your own needs. This of course requires coding knowledge, and using the MD blog and existing Dropins as a coding reference can greatly speed up the learning curve and help you create what you want in record time.
Dropins extend the WordPress interface by adding custom post types, taxonomies, meta boxes, and other MD specific fields right from your child theme.
By creating Dropins instead of relying on third party plugins for these kinds of extensions, you can save valuable server resources and plug into MD’s extremely efficient development system and reuse the same scripts MD uses to build your site.
Are Dropins the Future of Marketers Delight?
Dropins are versatile by nature and will unlock many minds to the power of MD’s internal coding system, but because a goal of Marketers Delight is to be as code-free as possible these Dropins will be considered as an extra resource for those who are interested in diving deeper into the world of custom development.
In the future tools like the upcoming MD Builder and data import/export system will render the FTP installation process outdated (but still possible), and powerful features similar to the ones you see in Dropins will be possible in visual interfaces.Go to the Dropins Library
Should we use include of include_once? Your explanation and the screenshot show different options.
Great question—I realized shortly after
include()is the better way to use for our purposes.
I have followed you instructions step by step but I do not see Gallery Blocks. I have looked for them in the page builder blocks as well as the admin menu. Where should I be seeing them? I am using a new WordPress install and I have tried flushing cache.