Thank you for that, works nicely and much more elegant than my solution, does it all in one place from the Control Panel and I can use this button only on the products I want it on. It was the [addtocart_url] piece I was missing before when I tried to add a custom button
Add the following message in Settings Basic Message Login Required Message option and set Hide Everything in Settings Basic Access Settings When user is not allowed to download:
Login is required to access this page
After setting these options, You will see a login link in packages where a user must log in to access the package.
Make sure to replace the basesiteurl in the message with your site URL.
No need to use the CSS to hide price info. You can customize the whole thing using custom link template. To add a custom add to cart button utilize the [addtocart_url] template tag as shown in the following example,
You have to enable redirect to cart option if you want to redirect the user to the cart page after clicking the button. You will find this option at the bottom of the Premium Package settings page.
You can replace the title in cols with page_link to link the details page with the title. But template customization is required to add the download link in the title.
You have to copy the /download-manager/tpls/wpdm-all-downloads.php file and place it in the /active-theme/download-manager/ directory.
Then replace echo "<strong>".get_the_title()."</strong><br/>"; with
echo "<a href='".\WPDM\Package::getDownloadURL($data['ID'])."'><strong>".get_the_title()."</strong></a><br/>"; in the new template.
Thanks a lot Shariar for your help. I even manage to do further customizations from your advices. I still have some of the issues discussed not solved.
> Thanks for the custom link Template doc. I understand the global process but what I do not understand is how to apply the correct code to customize the template, as I do not see examples. For example you helped me to modify the Product title font size with <h2 style> but I did not manage to customize the Category name font size below even if I inspected the page code… So #wpdm-downloads * {font-size: 10pt;} is still controlling it.
> To protect the file class.Categories.php from updates, I would like to add it in my Child theme. I tried : Child Theme >download-manager > widgets> class.Categories.php or Child Theme >download-manager > class.Categories.php but it does not work, what is the correct path to customize the category widget file in Child Theme?
> You added [title] so now the title becomes a link, but the title is underlined on hover . I tried .w3eden a {
text-decoration: none !important;}
but this code also applies to the category name. How can I do to control only the title (product name) ?
> Concerning Page titles, I understand that when I create a page or a post my theme controls the title (besides it displays correctly in « page-title pad group » when I create a page or a post). But when I add a download using WPDM plugin, I believed that the plugin would be controlling the title.
Hope you will be able to help me with these issues,
best,
Audrey
Are you adding file URL instead of attaching a file? This should work without any issue. Please send me a package URL to test the download and temporary wp-admin login info in private reply if possible.
There is no shortcode available for that. Custom coding is required for that.
But you can add the login popup in download button when user login is required for download. Just add the following code in Downloads Settings Basic Message Login Required Message section.
PDF Viewer is working now. Your server was not allowing the | in URL. I have made some changes in PDF Viewer add-on to handle thing in a different way.
The div will be added automatically when using a template. You can generate a download URL from all downloads page then add that link with package title in this case. It will keep the link in the same line.
You can utilize CSV import feature to create all your packages from CSV file. Amazon S3 files can be attached to the package using the URL. S3 file URLs should look something like this https://mybucket.s3.amazonaws.com/file.ext
In your CSV file write this URL under the files column. And separate the URLs using commas when there is more than one file.
The file *DID* exist in the amazon bucket and it does not have special characters. The issue is it works for a while and then the key expires. It means I have to go an check all my downloads and fix anything that has broken. I have fixed the issue by re-adding the file from the bucket in the system so I can’t send you to a package url at the moment. It’s a KEY expiry… not a document issue.
Add the following code to the bottom of your active theme’s functions.php file to redirect users to the homepage. You can add custom URL slug inside home_url function to redirect to a custom URL.
add_action('wp_logout', 'wpdm_logout_redirect');
function wpdm_logout_redirect(){
wp_redirect(home_url(""));
exit();
}
I’ve been using Scott Reilly’s Text Replace plugin for ages, and it’s always been perfect. But something has happened recently to disrupt it’s functioning and I’m not sure what’s up.
It has been working correctly within the context of WPDM on these pages since we built the site. I haven’t made any changes (other than usual plugin updates). I’m running WP 4.9.8 and the Text Replace plugin works fine on a test page outside of WPDM (http://nrocnetwork.org/resources/test-secure-icon/).
Can you tell what’s going wrong here? Is WPDM not filtering the other plugin’s code properly?
Here is the template code I’m using on the page where it should be working:
I have updated the all packages shortcode to display the custom field value. You have to put the whole custom field name acf_status_Bid Date To avoid any confusion it is better not to keep any space in the custom field name.
I have removed the [acf_Demo_demo_url] tag from the page template. It was added by mistake in the last update.
1#
It may happen due to some server settings, especially in siteground hosting. Please add the following to your site’s .htaccess file to get it to work:
So, you can update link template for all your packages to solve the download button issue. Or you can add a template parameter in your shortcode to override the link template from package settings. The template value should be the id of template you want to apply.
e.g. [wpdm_package id=24 template="5ba9485fe0687"]