Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shopifypartners/9012b28c8d5cc5732bee7afcaf002fbc to your computer and use it in GitHub Desktop.
Save shopifypartners/9012b28c8d5cc5732bee7afcaf002fbc to your computer and use it in GitHub Desktop.
function shopify_shortcode ($atts) {
$a = shortcode_atts(array(
'id' => ''
), $atts);
return '<div data-shopify-product="' . $a['id'] . '"></div>';
}
add_shortcode( 'shopify_product', 'shopify_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment