The Sticky Header feature is slated to make it into a future MD release, but for now this simple effect can be achieved with the above code snippets in your child theme.
With a few extra custom CSS styles, the sticky effect is made more elegant by narrowing the height of the header and reducing the font size of the site title to prevent the header from blocking too much content while scrolling.
Today MD4.9.6 is released with two notable new features and a handful of bug fixes and improvements. This is the first new release in a few months during the ongoing development of Marketers Delight 5.0 and I am excited to show you what’s new and talk about the future.
Use MD’s built-in HTML helper classes to quickly create custom website elements that match your design and are already fully mobile-responsive. Refer to this page as a reference for the most recent list of helper classes in each MD release.
If you’re using the Marketers Delight WordPress theme, you’re probably already interested in connecting with your visitors and growing your website. But if you’re only doing those things in a single language, you might be missing out on reaching potential fans and providing the best experience possible to your existing visitors.
One of the many things that makes WordPress great is how translatable it is to any language, opening it up as the premier software for the entire world to use. In this guide I will show you how to fully translate the text strings MD adds around your site from English to any language you prefer to use on your own website.
Running into issues with your site after updating, installing, or using Marketers Delight? Follow the steps on this page to get through the most commonly solved problems at the MD Forums.
1. My site isn’t loading CSS, or parts of my design don’t reflect styles from the Site Designer
To keep the CSS styles that power your website lightweight, Marketers Delight regularly rebuilds the style.css file on your server. Sometimes the file does not regenerate, causing your site to load either no styles or a limited amount.
To troubleshoot broken or missing CSS, go to MD > Settings > Save. Now return to your site and refresh it to see if it has returned to normal. If not, further troubleshoot the issue by going back to MD > Settings > Site Performance > Print Inline CSS.
Now you should see your site’s design back to normal, or at least loading the full stylesheet again.
This all but confirms that your server is not allowing the MD style.css file to regenerate because it does not have the proper file permissions setup.
You can learn how to change the file permissions of /wp-content/themes/marketers-delight/style.cssfile from this tutorial on WordPress.org. In short: change the permission of MD’s style.css file to 777.
After you correct the permissions, you can disable the Print Inline CSS option to go back to loading style.css.
It can also be useful to know that MD regenerates your site’s stylesheet when:
Update to a new MD version
Each time you press the save button on MD > Settings
MD offers many exciting updates that often change large parts of your website. As MD has matured over the years, updates have become more stable. However, conflicts can arise with old features or child theme customizations in new versions.
The closer you are to using MD without any child theme customizations, the less likely you will run into these conflicts. Changing CSS classes and overriding templates is where the problems arise, but even this gets fewer by the update.
Read the changelog of any version to see which template files have updated, and compare any MD CSS classes in your child theme stylesheets to how they are on your site after the update to find the most current class names.
Sometimes after big releases some features around MD can stop working or they do not act as expected. Sometimes features can also be changed intentionally, which is documented in new blog posts, but if you think that is not the case, help us fix it for future MD releases.
If any feature:
Doesn’t save after you make changes
Seems to load slowly
Works but doesn’t seem to display right
Go to the MD Forums to make a report and it will be investigated. These kinds of issues are fixed with a high priority, so don’t think your time will be wasted!
Sometimes Plugins can break MD’s functionality, and is usually due to scripts conflicts. If you think this is the case test your site after you temporarily disable the Plugin to see if that fixed your issue. If not, help can be provided at the MD Forums.
It is also possible to not be fully familiar with how a feature works, so be sure to read the MD website and demo site for fuller explanations of how to use MD’s features.
4. My site shows errors and warning messages
This can be one of the scarier issues to find, but all can be resolved! There are two types of error messages:
Error warnings (long, confusing messages show on website)
Enabling error messages
If you only see a white screen and no text, you need to turn on WP_DEBUG (and turn it off when you are done) to show error messages. After you do that, refresh your site to hopefully see the error.
Solving error messages
Now read the error message and look for any keywords that have the name of a Plugin or Theme running on your site.
If you recognize a name, you know the error is coming from that Theme or Plugin. If you have a fatal error, navigate to the correct folder in /wp-content/ via FTP and rename the Theme or Plugin folder to disable it on your site.
If your site works after this, you can continue as best you can and report the bug to the Theme/Plugin owner to hopefully get it fixed.
By introducing a modular CSS system, and updates to the Scripts Manager, MD4.9.4 is better than ever at serving only the most relevant scripts and styles to keep any given page as lightweight as possible.
Like with all major updates, MD4.9.4 adds just as much as it takes away.
To keep adding new features and capabilities into Marketers Delight comes with the responsibility to grow in a way that’s best for the overall health of your website.
A big tool like WooCommerce requires a lot of work to setup—not including many performance optimizations—and there MD has improved in many ways to better design your store and keep your website fast-loading.
Now in the click of a button you can make your MD powered website fully compatible with WooCommerce.
The MD Scripts Manager makes it easy to optimize your most important pages by removing extra scripts and styles Plugin’s tend to load all over your website.
Using the md_filter_dequeue_scripts filter, you can add the names of the scripts and styles enqueued from Plugins and MD will hook into the WordPress enqueue system to give you an easy admin setting for disabling those scripts on individual posts, pages, and categories.
For example, once you activate the WooCommerce integration you will see a new option in the Scripts Manager (from the post editor) that allows you to remove all of the WooCommerce and scripts and styles on the entire page!
Why is this useful? Some of your most important pages may be loading scripts and styles by other Plugin’s that are not needed, causing many areas of your website to load slower than they should.
The MD Scripts Manager tackles this by hooking into the WordPress enqueue system to dequeue bad Plugins that load uncontrollably around your website.
Since there are so many Plugins in the world, MD simply cannot support them all. This filter has been created so you can add the Plugin’s you use to the Scripts Manager right from your child theme.
Extending the Scripts Manager
Take the code snippet from the top of this page and paste it into your child theme’s functions.php file, or any other file you may use for MD filters.
You will see the example has scripts and style names taken from WooCommerce, and this is the structure you can follow for adding the names of scripts and styles from other Plugin’s.
Note: Scripts (.js files) and Styles (.css files) require slightly different mechanisms to load, so always be sure to keep them separate in the Filter array.
How to use md_filter_dequeue_scripts
Time to go under-the-hood to find which scripts and styles we are looking for. Think about this like you are opening the hood of a card to fix the engine, except your website’s engine is a lot easier to work on:
1. Search the document (press cmd or ctrl + F) and type in keywords that may match the Plugin, like woocommerce for example which finds the following:
(click image for a larger size if needed)
2. Note that any script or style that is properly loaded into the WordPress enqueue system (if it’s not, you should report that as a bug to the developer) will register with a name for the script and a direct link to the .css/.js file.
You need to remember the Plugin folder name and use that in the filter, as well as copy each script name (or id from the screenshot) into the list of files.
3. The screenshot has four Stylesheets (.css) file names: wc-block-style, woocommerce-layout, woocommerce-smallscreen, woocommerce-general.
Note I ommitted the “-css” at the end of each file name as WordPress automatically adds that suffix to the end. For this filter to work, make sure you do not include the “-css” suffix in the filter unless you are sure that it is really part of the name.
Now to plug that into the blank filter as shown above will look like this:
To find the scripts is the same exact process, just plug the scripts name into the scripts section of the Filter.
How can you tell the difference behind a script and a style?
A script will always:
Load with the <script src="">
End the file extension as .js
A style will always:
Load with the <link href="">
End the file extension as .css
Use those two huge tells to quickly tell the difference between a script and style file.
Removing Scripts From Pages
Now that you have plugged in the correct file names and saved the filter to your child theme, let’s go test it out!
Go edit and post, page, or category and look for the Scripts Manager setting in the meta boxes section.
At the very bottom you will see the Scripts Optimization section, and your new custom option!
Simply enable the option(s) to remove the Plugin’s script you don’t want, save the page, and go see if the page has responded.
It’s worth repeating that the Plugin must be using the WordPress enqueue system to load its scripts and styles because otherwise MD will not be able to remove anything. It is seen as a bug if a Plugin’s scripts are not enqueued, and worth reporting to the Plugin developer (it would seem, amongst other things).
This functionality expands to all Posts, Pages, Categories, and even Custom Post Types and Archives that add MD’s meta boxes.
WordPress 5.2 came out last week and introduced an interesting new tool called Site Health, which is a new admin screen that gives you performance, security, and other optimization tips in your dashboard.