portalkairos

Forum Replies Created

Viewing 25 posts - 1 through 25 (of 81 total)
Jul 6, 2026 at 8:53 pm
#214954
Member
portalkairos
OP

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]
Jul 6, 2026 at 4:09 pm
#214950
Member
portalkairos
OP

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;
}
Jul 6, 2026 at 1:52 pm
#214947
Member
portalkairos
OP

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.

Jul 6, 2026 at 1:35 pm
#214945
Member
portalkairos
OP

Jul 6, 2026 at 1:35 pm
#214944
Member
portalkairos
OP

Jul 6, 2026 at 1:33 pm
#214943
Member
portalkairos
OP

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.

Jul 5, 2026 at 6:08 pm
#214931
Member
portalkairos
OP

Jul 5, 2026 at 6:07 pm
#214930
Member
portalkairos
OP

Jul 5, 2026 at 6:07 pm
#214929
Member
portalkairos
OP

Jul 5, 2026 at 5:42 pm
#214927
Member
portalkairos
OP

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.

Jul 4, 2026 at 1:20 am
#214917
Member
portalkairos
OP

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.

Jul 4, 2026 at 12:39 am
#214915
Member
portalkairos
OP

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/”

Jul 4, 2026 at 12:34 am
#214914
Member
portalkairos
OP

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.

Jul 3, 2026 at 7:20 pm
#214912
Member
portalkairos
OP

*** 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']

Jun 27, 2026 at 11:47 pm
#214763
Member
portalkairos
OP

I was so looking forward to it, and you guys didn’t fix this problem in this update.

Jun 22, 2026 at 11:44 pm
#214677
Member
portalkairos
OP

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.

Jun 15, 2026 at 3:14 pm
#214573
Member
portalkairos
OP

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.

Jun 15, 2026 at 5:47 am
#214570
Member
portalkairos
OP

Why? What am I supposed to do now? This will greatly delay my work.

May 23, 2026 at 3:54 pm
#214300
Member
portalkairos
OP

Please, can someone tell me how to solve this problem? I’m having the exact same issue!

Apr 13, 2023 at 5:35 pm
#185908
Member
portalkairos
OP

Thank you for your attention!

Changing the theme it is really complicated.
But think about Enfold Theme users in future updates.

Apr 12, 2023 at 5:54 pm
#185873
Member
portalkairos
OP
This reply has been marked as private.
Apr 12, 2023 at 5:54 pm
#185872
Member
portalkairos
OP

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/-

Apr 7, 2023 at 6:49 pm
#185755
Member
portalkairos
OP

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!

Apr 7, 2023 at 12:01 pm
#185741
Member
portalkairos
OP
This reply has been marked as private.
Apr 3, 2023 at 7:02 am
#185594
Member
portalkairos
OP

Thanks, I think it was a cache issue.

Viewing 25 posts - 1 through 25 (of 81 total)