It took me a while, but I figured out how to get CiviDiscount to work when providing the link directly to the contribution page, however I'm trying to use a shortcode to embed the CiviCRM contribution page into a WordPress page.
The generated shortcode looks like this:
[civicrm component="contribution" id="2" mode="live" hijack="0"]
I modified it to look like this:
[civicrm component="contribution" id="2" mode="live" discount="pkpwpabs7" hijack="0"]
I took a guess, but my guess was wrong. Is there a way to do this?