Support » Plugin: Easy Digital Downloads - Simple eCommerce for Selling Digital Files » demo link
demo link
-
hey, I want to provide a demo link with the product, but I am not able to find that option.
-
Plugin does not have any feature to add “Demo Link”. Do you have any rough screenshot how you want? so may be I can help you.
Right now, you can add it with product description so it will be displayed at product single page.
I want the demo link button will appear on the middle https://prnt.sc/nkxqyk
Thanks for the screenshot.
I am not sure how you added the “Update” button. Can you tell me how you added the “Update” button.
Can you please provide me the webpage link on which you have added the EDD product download button?
Sorry, I can’t provide you the link of the website, but I have added the update button with Elementor. I want a dynamic demo button to
OK.. You need to do some custom coding for this. You can do something like this
1) Register a custom metabox “Demo Link” for EDD products ans save it’s value
2) Now use EDD action to display custom “DEMO Link” after the EDD purchase button.Here is EDD action hooks https://docs.easydigitaldownloads.com/category/504-hooks
If you are using
purchase_link
shortcode then this actionedd_purchase_link_end
will be helpful.can you please explain to me in a non-technical way. if you can create a tutorial for this that will be helpful
No Problem. Give me some time I will try to create a sample code for this.
Thank You, I am waiting
Kindly add below code to your theme functions.php file.
/** * Enables the Excerpt meta box in Page edit screen. */ function _edd_add_post_type_support() { add_post_type_support( 'download', 'custom-fields' ); } add_action( 'init', '_edd_add_post_type_support' ); /** * Display product demo link */ function _edd_purchase_link_end( $download_id, $args ) { $demo_link = get_post_meta( $download_id, 'edd_demo_link', true ); if( $demo_link ) { echo '<a href="'.esc_url( $demo_link ).'" class="button blue" target="_blank">'.__('Demo Link').'</a>'; } } add_action( 'edd_purchase_link_end', '_edd_purchase_link_end', 10, 2 );
Once you add code and save it then you can see “Custom Fields” metabox section at product add / edit screen. In that you need to add product demo link so meta name will be “edd_demo_link” and value will be your demo link. Please refer below screenshot
https://screenshots.firefox.com/YFN4mxyfu9vqJiL9/192.168.1.53A demo URL button will be added to after EDD Product purchase button.
- The topic ‘demo link’ is closed to new replies.