Forum Replies Created
Thank you sincerely for all the help and attention. Congratulations.
I found the solution by pasting this code directly into the page templates.
/**
* Displays content only to logged-in users.
* Usage:
* [somente_logado]content[/somente_logado]
*/
function pk_somente_logado_shortcode($atts, $content = null) {
if (!is_user_logged_in()) {
return '';
}
return do_shortcode($content);
}
add_shortcode('somente_logado', 'pk_somente_logado_shortcode');
/**
* Displays content only to visitors (not logged in).
*
* Usage:
* [somente_visitante]content[/somente_visitante]
*/
function pk_somente_visitante_shortcode($atts, $content = null) {
// If the user is logged in, display nothing.
if (is_user_logged_in()) {
return '';
}
// Display content to visitors.
return do_shortcode($content);
}
add_shortcode('somente_visitante', 'pk_somente_visitante_shortcode');
[somente_visitante]
This content only appears to those who are NOT logged in.
[/somente_visitante]
[somente_logado]
This content only appears to logged-in users.
[/somente_logado]
This code would work well if I could specify the “Page Templates,” because I can’t stop using the zip across the entire site.
add_filter( 'wdm_before_fetch_template', 'hide_download_link_for_logged_in_users', 10, 3 );
function hide_download_link_for_logged_in_users( $vars, $template, $package ) {
if ( is_user_logged_in() ) {
$vars['download_link'] = '';
}
return $vars;
}
I had to remove the download link so that people couldn’t download the watermark-free PDF from multi-file packages.
<div class="well">
[download_link]
</div>
But this causes MY PROBLEM: the link for people to log in or sign up for protected packages doesn’t appear.


I greatly appreciate your willingness to help.
But it didn’t work. What prevents me from using:
“When user is not allowed to download: Only Block download link”?
The problem is that by placing the “download link” on the package page, people can download a PDF (zip) file without the watermark.
And even so, I need the link for people to log in or sign up.
Thanks.



The problem is that when there are multiple files in the package, I have to remove the download link; otherwise, the PDF downloads in ZIP format without the PDF Stamper watermark.
I don’t think I’m explaining this clearly:
–When user is not allowed to download:
“Hide Everything”
–Does not show the package inside the posts and blocks access to the package contents.
“Only Block download link”
–Shows the package inside the post and displays the package contents.
***What I need:
Shows the package inside the posts but blocks access to the package contents.
I asked ChatGPT to do it for me to get around this problem:
/**
* Makes [wpdm_package id='XXXXX'] appear as a public link,
* even when WP Download Manager hides the package button.
*
* Does not force a direct download. It only displays the link to the package page.
*/
add_action('init', function () {
remove_shortcode('wpdm_package');
add_shortcode('wpdm_package', function ($atts) {
$atts = shortcode_atts([
'id' ► 0,
], $atts, 'wpdm_package');
$id = intval($atts['id']);
if (!$id) {
return '';
}
$url = get_permalink($id);
$title = get_the_title($id);
if (!$url) {
return '';
}
if (!$title) {
$title = 'Acessar arquivo';
}
return '<p class="wpdm-link-forcado">
<strong>📥 Baixe aqui:</strong>
<a href="' . esc_url($url) . '" target="_blank" rel="noopener">
' . esc_html($title) . '
</a>
</p>';
});
}, 9999);
But it doesn’t look good:
“portalkairos.org/nossas-criancas-na-campanha-da-fraternidade-2026/”
Yes, but I don’t want to show the contents of the packages to non-users.
There is no reason for the shortcuts not to appear in the posts, even if they are protected. Please consider this for the next update.
*** The package link works the way I want it to, but the package shortcut doesn’t — it isn’t displayed.
OKAY-https://portalkairos.org/arquivo-portal/mapas-da-biblia/-
HIDDEN-[wpdm_package id='68286']
I was so looking forward to it, and you guys didn’t fix this problem in this update.
I love this plugin, but that’s why I take so long to update it.
Besides that issue, the file size is now showing up as “undefined.”
I’m also waiting for the music player to become a pop-up and play all the songs in the package.
Thanks.
This problem is in the new Download Manager 7.x version, because when I used version 6.x, “Lazy Download” 2.7.3 and 2.7.4 appeared in “Package Settings”. This problem is causing me a lot of trouble.
Why? What am I supposed to do now? This will greatly delay my work.
Please, can someone tell me how to solve this problem? I’m having the exact same issue!
Thank you for your attention!
Changing the theme it is really complicated.
But think about Enfold Theme users in future updates.

Hi, thank you very much for your attention.
I delayed the update a lot because of the tag issue.
I updated the site and migrated the tags.
But I couldn’t change the structure of the Enfold Theme single post.
I created the -single-wpdmpro- file in Child Theme but I couldn’t separate the Categories from the wpdm-tag and put the wpdm-tag at the end of the post. (old tags place)
-https://portalkairos.org/arquivo-portal/folhetos-do-domingo-de-pascoa-2023-09-04-2023-para-imprimir/-

I am very grateful for your help.
But I went back to version 5.2.4, before the TAG change. It became a big nightmare for me. Google gives me first place with many tags.
I really like this plug-in and I’ve been using it and recommending it for years.
But the updates have only made things worse and I’m getting a lot of errors and a mess.
Maybe it will come back in version 7.
Thanks!
Thanks, I think it was a cache issue.