• Resolved Stonehenge Creations

    (@duisterdenhaag)


    Hi ??
    I am using the shortcode [downloads] to show a grid of all available products.

    The generated button is “edd_add_to_cart”. So when a user clicks it, the product is added to the cart. How do I change this so clicking the button will go to the product page (just like the image and title already do)?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @duisterdenhaag

    Right now the simple thing is you can hide the ‘Add to Cart’ (Buy) button with shortcode parameter. i.e [downloads buy_button="false"]

    So people will only go to product page by clicking the image or title.

    Thread Starter Stonehenge Creations

    (@duisterdenhaag)

    Thanks for the fast reply.
    Is there a filter or hook then to add a custom button?

    Hi @duisterdenhaag

    Yes, EDD have a hook for this.

    Please add below code snippet to your current theme / child theme functions.php file.

    function _add_btn_edd_download_after() {
    	echo '<a class="button blue edd-submit" href="'. esc_url( get_permalink() ) .'" target="_blank">'. __('Read More') .'</a>';
    }
    add_action( 'edd_download_after', '_add_btn_edd_download_after' );
    Thread Starter Stonehenge Creations

    (@duisterdenhaag)

    Perfect, @pratik-jain! Thanks! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change button url in [downloads]’ is closed to new replies.