我有一个 NFT 系列,我正在尝试从我自己的 Wordpress 托管网站上出售它。
我该怎么做? 他们的文档没有解释如何在 WordPress 博客中添加他们的 NFT 结帐 SDK。
您可以使用 Wordpress 中的 HTML 嵌入块来管理它。这是一个可以帮助您入门的代码片段:
<script src="https://unpkg.com/@crossmint/[email protected]/lib/index.global.js"></script>
<crossmint-pay-button
projectId="_PROJECT_ID_"
collectionId="_COLLECTION_ID_"
mintConfig='{
"type": "erc-721",
"totalPrice": "_PRICE_PER_NFT_"
}'
environment="staging"
/>
您需要为您的收藏添加
projectId
和 collectionId
,这可以在 Crossmint 开发者控制台中找到。
如果您的 mint 函数接受数量参数,则该参数也应该包含在
mintConfig
对象中。例如,如果数量参数名为 _quantity
,那么您需要将 "_quantity": "1"
添加到 mintConfig
。
对任何自定义 mint 函数参数都遵循相同的模式,使用参数名称作为属性。
最后,请注意
environment
属性。这必须与您正在使用的控制台匹配。
staging/testnets:https://staging.crossmint.com/console
产品/主网: https://www.crossmint.com/console
这里是 Crossmint 文档中有关此内容的食谱的链接:https://docs.crossmint.com/recipes/adding-the-crossmint-button-to-wordpress-squarespace-webflow