Top 5 code snippets for the WP Dispensary menu management plugin

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.
* 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



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s