Hi WPDM team,
I’m writing to report an interaction between WordPress Download Manager (WPDM) and the Rara Business theme that consistently crashes WPDM single package pages. I’ve included the environment details, the reproducible error, and the workaround we implemented.
Environment
WordPress: 6.6.2
PHP: 8.2 (running on WHC / cPanel with zlib compression enabled)
WPDM: 3.2.99 (Free)
Theme: Rara Business (latest from WordPress.org, v1.2.9)
Hosting: Linux/Apache with Cloudflare in front
Permalink base for WPDM packages: /files/<slug>/
Problem description
After switching the WPDM package permalink base to /files/, visiting a package single page at /files/<package-slug>/ triggers a fatal error.
Stack trace excerpt:
PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, WP_Error given
in /wp-content/themes/rara-business/inc/template-functions.php:433
#0 /…/template-functions.php(231): rara_business_breadcrumb()
#1 /wp-includes/class-wp-hook.php(324): rara_business_content_start(”)
#2 /wp-includes/plugin.php(517): WP_Hook->do_action()
#3 /wp-content/themes/rara-business/header.php(59): do_action(‘rara_business_content’)
#4 /wp-content/themes/rara-business/single.php(12): get_header()
Root cause:
The theme’s rara_business_content_start() calls rara_business_breadcrumb(), which assumes a post category context. On WPDM singles (custom post type wpdmpro), it receives a WP_Error. This value is passed directly into explode(), producing the fatal.
What we tried
Switched to Twenty Twenty-Five → WPDM singles load normally.
Disabled all MU plugins and caching layers → crash persists with Rara Business.
Built a child theme to gate the do_action( ‘rara_business_content’ ) call → functional but brittle and caused styling regressions.
Minimal, upgrade-safe workaround
We developed a compatibility plugin (wpdm-rara-compat.php) that:
Removes the theme’s content-start callback from the rara_business_content hook.
Re-adds it with a guard so it runs everywhere except on WPDM singles.
Restores normal page layout on WPDM singles by injecting wrapper markup (container/row/content/sidebar) around the_content and aligning the page title.
Plugin code:
<?php
/**
* Plugin Name: WPDM × Rara Business Compat
* Description: Prevents Rara breadcrumb crash on WPDM singles, restores layout.
* Version: 1.0
*/
add_action(‘after_setup_theme’, function () {
// Remove theme’s content-start callback
remove_action(‘rara_business_content’, ‘rara_business_content_start’, 10);
// Re-add guarded callback
add_action(‘rara_business_content’, function () {
if ( is_singular([‘wpdmpro’,’wpdm_package’]) ) return;
if ( function_exists(‘rara_business_content_start’) ) {
rara_business_content_start();
}
}, 10);
}, 99);
// === Layout wrapper for WPDM singles ===
add_filter(‘the_content’, function ($html) {
if (!is_singular(‘wpdmpro’) || !in_the_loop() || !is_main_query()) return $html;
// Prevent double wrapping
if (str_contains($html, ‘class=”site-content single-wpdmpro”‘)) return $html;
ob_start(); get_sidebar(); $sidebar = ob_get_clean();
return
‘<div id=”content” class=”site-content single-wpdmpro”>’ .
‘<div class=”container”><div class=”row”>’ .
‘<main id=”primary” class=”content-area col-lg-8″><div class=”site-main”>’ .
$html .
‘</div></main>’ .
$sidebar .
‘</div></div>’ .
‘</div>’;
}, 20);
// Align WPDM single title with content column
add_filter(‘the_title’, function ($title, $post_id) {
if (is_admin() || !is_singular(‘wpdmpro’) || !in_the_loop() || !is_main_query()) return $title;
if ((int)$post_id !== (int)get_queried_object_id()) return $title;
if (strpos($title, ‘wpdm-title-wrap’) !== false) return $title;
return ‘<div class=”container”><div class=”row”><div class=”col-lg-8 wpdm-title-wrap”>’ .
$title .
‘</div></div></div>’;
}, 10, 2);
Current status
WPDM singles now load correctly at /download/<slug>/. Example: https://complianceinsight.ca/download/press-release-2025-09-02/
Site styling restored (title + content aligned with container/row).
No more fatals. Logs show only benign PHP 8.2 notices from the theme’s Customizer notice class (Deprecated: Creation of dynamic property …).
Suggestions
WPDM resilience: Adding a defensive check around breadcrumb/taxonomy lookups for custom post types would help WPDM work out-of-the-box with themes that assume posts/categories.
Theme interaction doc: A short WPDM doc page on “Theme compatibility” (especially around breadcrumb hooks) would help other users avoid this.
Optional hook: A dedicated filter to let developers wrap WPDM singles in their theme’s grid without intercepting the_content would simplify compatibility work.
Happy to provide a staging URL or further debug info if you’d like to see the exact crash path in action.
Thanks for your continued work on WPDM—outside this theme-specific issue, the plugin has been solid.
Hi guys,
We’re building a new website and have setup Download Manager Pro.
Currently the permalinks are not linking to the files and just open in a page which requires you to click on the link again to download them. Is there a setting in Download Manager Pro to make the files download automatically from the permalink?
I’m using the Newsletters plugin to alert subscribers when a new package is uploaded, specifically using the “Send Message To Subscriber” section on the “Add New File” page of the Download Manager.
Currently the email arrives with whatever text was input in the section above, plus a generic addition:
Check Updates (linked to website)
Best Regards,
Support Team
(link to website)
I want to use a custom template for this, but cannot find anywhere in the backend of the website or in the plugin files to do this.
Hi,
Amazing plugin. Eventually I plan to buy Pro, but for now I’m still playing around with it. Some questions:
Similar to a stock photo site, I want to be able to just have an image gallery with a link on each image (no buttons, title or description etc), that takes you to the image page, then on the linked image page I want the download button and description.
Do I need to use CSS to style this and create the linked page in the Free version? In the Pro version is there more customization for this?
Thanks!
Problem: Clicking the close button on WPDM download modals doesn’t close them. Instead, each click creates a duplicate modal instance in the DOM.
Environment:
WP Download Manager: 6.8 (?) cant find a more precise version anywhere in settings.
PHP: 7.4
Theme: GeneratePress
Browsers: Chrome & Firefox & Edge (latest)
What Happens:
enter password & Click download link → modal opens correctly
Click Close/X button → modal stays open
DOM inspector shows multiple div.modal.fade.show elements (one per click)
Only way to exit is refreshing the page or closing the tab
Console Shows:
⚠ JQMIGRATE: jQuery.fn.click() is deprecated
⚠ JQMIGRATE: jQuery.fn.unbind() is deprecated
⚠ JQMIGRATE: jQuery.fn.bind() is deprecated
on close click it shows in console (per click)
Object { 0: div#__boot_popup.modal.fade.show, length: 1 }
Object { 0: div#__boot_popup.modal.fade.show, length: 1 }
Object { 0: div#__boot_popup.modal.fade.show, length: 1 }
Object { 0: div#__boot_popup.modal.fade.show, length: 1 }
Hi,
We need to create a page with one or two text input fields, to search a downloadable content categorized with custom fields. Initially, the page should only contain the search field. Once a text search is performed, the relevant results will be displayed below the search field. The custom fields are created with the plugin Advanced Custom Field by WP Engine.
Is it possible to create something similar with your system?
We try this code founded on your documentation but it not run:
Shortcode – [wpdm_simple_search template=”link-template-cardh” cols=2 ]
Example page – https://polydentia.ch/download-center/e-ifu/
Best Regards
Andrea
Before I purchased the WPDM ACF add-on, I read on the add-on page on your website (https://www.wpdownloadmanager.com/download/advanced-custom-fields/) that you can “8. Customize front-end package form
” – but I cannot find any documentation on how this works. I have created field Groups, and fields within those groups. But how do I connect those groups or fields into the Add New Package form on the front-end? I can see screenshots of the outcome of this on the ACF add-on page, but no documentation as to how to do it – please explain how this works. Thanks
How can I create the a page like this one on the demo page?
https://try.wpdownloadmanager.com/downloads/free-downloads/
Does this require the pro version? I don’t mind buying it, but I don’t want to buy it to find out it does not come with this. I need users to land on this page and type in their model number to filter the list to only give them the downloads for their model. Would also like for it to be able to have an argument in the URL to filter by, so we can send them direct links.
Thanks