If you haven’t been following our tweets, you may not have noticed that we’ve been overhauling our documentation using the DocuPress plugin. While adding the currently available docs in, I noticed that there were a few code snippets that have been created over the last few months that highlight how easy it is to customize WPD. This post will break down 5 code snippets for WP Dispensary that lets you customize your menu beyond the default settings and make your website uniquely yours. Add “View Details” button to shortcode output The following code will add a View Details button to the bottom of each item displayed via the shortcodes, similar to how the WooConnect add-on adds view details and buy now buttons. <?php /** * WP Dispensary - view details button */ add_action( 'wpd_shortcode_inside_bottom', 'acme_viewdetails' ); function acme_viewdetails() { ?> <p><a href="<?php the_permalink(); ?>" class="acme-button">View Details</a></p> <?php } // function acme_viewdetails Remove “In Stock” message from the Inventory Management add-on Our Inventory Management add-on does a great job of adding
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.