Download Manager has the option to replace the download button with the login page link when a user is not logged in. You can customize this login button from Settings Basic Messages Login Required Message: option. Are you trying to do that?
Or just want to redirect all guest users to the login page from any page in general? Add the following code to your theme’s functions.php
file if this is the case. Before adding the code create the login page with WPDM login shortcode [wpdm_login_form logo="your_logo_url"]
and set this page as Login Page in Settings Frontend Login Page option.
add_action( 'template_redirect', 'wpdm_login_redirect' );
function wpdm_login_redirect(){
if( ! is_user_logged_in() && get_the_ID() != get_option('__wpdm_login_url') ):
wp_redirect( get_permalink( get_option('__wpdm_login_url') ) );
exit();
endif;
}
Looks like the shortcode is coming from some other plugin, not WPDM Accordion add-on ( https://www.wpdownloadmanager.com/download/wpdm-accordion/ )
Here is a sample accordion shortcode,
[wpdm-accordion cats=”catid,” cat_style=”default” subcat_style=”success” template=”link-template-calltoaction2″ orderby=”title” order=”asc”]
This reply has been marked as private.
Users can visit the download page to download the file.
It is possible to add the main download button by doing the following customization but it is not guaranteed that it will work. Add the code at line 227 in /tpls/wpdm-add-new-file-front.php
template. ( Make a template file like the previous template file )
<?php if( isset( $pid ) ) echo \WPDM\Package::downloadLink($pid, 0, array('template_type' ► 'link')); ?>
The “Register now” page link is coming from the Custom Link Template. Your plain download links have to be replaced by WPDM Shortcodes. Otherwise, you can’t add the “Register Now” link.
https://www.evernote.com/l/AUcSe2kZuM5K9JWEoFR8dn7M2zqy6k9AnScB/image.png
Actually, as you have to replace all the links, Default Values add-on won’t be much help. This add-on can bulk update any package settings. So, I thought using this you could change the link template of all packages in a single click. But changing the link template in pacakge settings doesn’t have any effect on your plain links. It would have been a great solution if you used shortcodes to show downloads.
Latest WPDM is using the latest Font Awesome, so the issue may be arisen from there. However, I have to check your installation to be certain about the origin.
Create a new support ticket to discuss this issue further. And send me the shortcode you are using there. Maybe you are using the wrong parameters. For example the following shortcode will display downloads in 3 columns,
[wpdm-archive cat_view="compact" button_style="inverse" link_template="link-template-calltoaction1" order_by="post_title" order="asc" items_per_page="9" cols=3]
This reply has been marked as private.
This reply has been marked as private.
when i try to download a 3d or 2d file i need to redirect to this page
https://www.tosconova.com/nuovo/register-now/
i’ve add the link and now is ok…
but i can’t understand why i need to add an add on to bulk change the default value and i can’t use the simple download link i have already created for all my 1200 link…
Dear Shahriar
webpage link is: https://www.l-mobile.com Yes we used a custom template for downloads and archive page. How is it possible to create a custom archive page template? We tried to overwrite existing css but as we have problems to find right classes to customise behaviour of category overview.
Best Regards Marc
Hi,
Here are the answers to your queries:
1. If files are added as URL ( from local server or remote file ), zip download will not work, as php can’t create zip file from urls.
2. No such option for now, but noted for implementation.
3. You can do that by editing that link/page template. Doc: https://www.wpdownloadmanager.com/doc/templates/
Please give me temporary wp-admin login info in a private reply if you want me to check those in details.
Now, your forum posting should work fine, but if you face issue again in forum, please mail to support@wpdownloadmanager.com
Hi There;
I have several items I need help with, probably easy for you pros, but i’m unable to figure them out:
1) Users downloading from their cart get a 15 byte zip file regardless of the number of items in the cart. if they download individually or a complete package it works fine
2) I need to be able to display the file size and / or the file title in the cart vs. the file name – can this be done and if so how?
3) I need to modify the template i created for the package list to do the following:
a) the package title needs to be underlined in red to match the rest of the titles on the site
b) i need to remove the “related downloads” links at the bottom of the pages
thank you!
Bob
PS: I’ve been trying to post this for a couple of weeks, in firefox, if this works, it’s in safari… I wonder why?
Hi,
Are you using a custom template? Built-in templates shouldn’t create any layout issue. Please send me page link to check the pagination issue, I can suggest custom CSS to hide the pagination numbers and only show next/previous buttons in mobile.
Directory add-on default view has changed in the latest version. The old view ( categories above downloads ) is not available anymore. But it is possible to use that view using a custom template.
Thanks.
Sorry, the option is actually “Login Required Message:” Actually, It was there before but your theme is hiding the .panel
class, that’s why the login button was hidden. I have removed the div with .panel
class and updated the “Login Required Message:” option. Now the login button is visible.
Currently login button is linked to the default WP login page. If you want you can create a page with [wpdm_login_form logo="your_logo_url"]
shortcode to use the WPDM login form. Then set that page as login page in Settings Frontend Access Login Page option.
You can use the Default Values Add-on ( https://www.wpdownloadmanager.com/download/wpdm-default-values/ ) to bulk update link template for all packages. The link template option in your first screenshot is meant for a different purpose.
Hello
May i change domain address linked to Download Manager?
Thanks
Pascal
Hello Shariar,
downloads never stopped working. I changed them to display the links to the files inline, after submitting the form . But what we really need is to get those links sent via email to the people that submit the form, which is how it was working before the main plugin update to its latest version.
Can you please check this again? I was out for a couple weeks on vacation, but I have to solve this issue this week.
Eventually, if you can confirm this will work with the paid version of the main plugin, we can purchase it, but I would prefer not to spend time on testing if it won’t work as expected.
Let me know, please. Thanks.
Add the following code to your theme’s functions.php
file. This should delete attached files when deleting the pacakge.
add_action('before_delete_post', 'wpdm_delete_files_on_package_deletion' );
function wpdm_delete_files_on_package_deletion( $post_id ){
if( get_post_type($post_id ) != 'wpdmpro' ) return;
$files = maybe_unserialize(get_post_meta($post_id, '__wpdm_files', true));
if (!is_array($files)) $files = array();
foreach ($files as $id ► $file):
if( file_exists( $file ) )
unlink( $file );
if( file_exists( WP_CONTENT_DIR.'/uploads/download-manager-files/'.$file ) )
unlink(WP_CONTENT_DIR.'/uploads/download-manager-files/'.$file );
endforeach;
}
This reply has been marked as private.
hi,
sorry but I have not received a message notify
i’ve add to .htacces the code
now i can save the option but if i insert the link
<i class=”fa fa-lock”></i> Login
i save the option and if i return in the page, the option disappear…
– in the front end access i’ve atctivated your custom template…but i see the old version…
i need to change all the download settigs of your template automatically because i’ve a lot of download…
i set the new template (but i neet to see only tet link, not the button)
let me know
This reply has been marked as private.
Tested from Chrome too. However, you can use the embedded form instead of popup as you are facing the issue. You have to use a page template with [download_link_extended]
to show the embedded form.
The built-in ” Single Column, Image Top, Extended ” uses the embedded form. Or you can clone the current template and replace [download_link]
with [download_link_extended]
I originally had the linkage usage set and thought this might be the problem, so I cleared the field. I did not realise that it would default to 0.
However the download still does not work for me.
Using Windows Edge, I get the left hand popup, an overlaid progress wheel and then back to the left popup. I have never seen the right hand popup in your figure (possibly because this is Firefox specific?).
I tried deleting all occurrences of my email from the subscribers list but this made no difference.
I tried a different computer and user account and the result was the same
I tried using Internet Explorer 11 and the download popup does not appear (the url is given as http://www.coastalsea.uk/#unlock)
I hope this gives you a bit more to go on.
At first, I got the expired link error because your “Private Download Links Usage Limit:” was set to 0
I have increased it to 10.
https://www.evernote.com/l/AUcPLgjhf7dL8723txj2zlf5ZcXPt7uHanAB/image.png
Now downloads are working fine for me. Please test the download and let me know if still having an issue.
https://www.evernote.com/l/AUcFCVe9CHFF-oOJjTSFH7U7wbzVKHLHMV0B/image.png
Please check the Downloads Templates page to be certain about the missing templates. However, restoring a backup should restore the custom template considering they existed when the backup was created.
Custom templates are saved in wp_options
table under _fm_link_templates
and _fm_page_templates
name. So, you can check those entries in your backup DB in case don’t want to restore the whole site.
1 ) Add the following CSS in Customize Additional CSS to remove uppercase,
.wpdm-cat-link.btn {
text-transform: none;
}
2 ) Use a custom link template with [icon]
tag to show package icon. You can clone the current template and edit on top of it.
3 ) Use [description]
tag in your custom link template to show package details.
Please check this tutorial to understand how to create custom templates https://www.wpdownloadmanager.com/building-a-wordpress-download-manager-link-template-from-scratch/