Skip to content

Instantly share code, notes, and snippets.

@colegeissinger
Last active December 28, 2015 08:49
Show Gist options
  • Save colegeissinger/7474399 to your computer and use it in GitHub Desktop.
Save colegeissinger/7474399 to your computer and use it in GitHub Desktop.
It is recommended to automate any static links and use get_permalink() when possible. This will allow us to future proof our code and allow WordPress to generate these URLs. Get the post ID and pass that through get_permalink() for that specific post.
$output = '<div class="sip-promo-area ' . esc_attr( $align ) . '"><a href="' . get_permalink( 348718 ) . '"><img src="'.get_stylesheet_directory_uri().'/images/3DPrintingSIP_Widget_Final.jpg" class="" style="width:234px; height: auto;" /></a></div>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment