وردپرس
Cannot build my first block
Hi all,
I’m trying to build my first block with this tutorial, and installed wp-env and @wordpress/scripts etc. based on previous introduction. However, the first block “copyright-date-block” cannot be shown in my new post/page and I cannot find any introduction about this problem.
My steps are:
- Create a block plugin by command:
npx @wordpress/create-block@latest copyright-date-block –variant=dynamic
- Enter copyright-date-block and start wp-env:
wp-env start
- Visit http://localhost:8888, login, and make sure the copyright date block plugin is activated.
- Click “New” to the page for creating a new post/page, Click the add icon to open the blocks, search “copy”, it should exist based on the tutorial but it doesn’t.
Other information may help:
- In web dev tools, there is only css being loaded.
- block.json and index.js is able to be visited in url. So it is deployed to the server.
- Not use wp-env, but copy the build folder and copyright-date-block.php to another wordpress environment, the problem still exists.
Code was uploaded to this github repository.
Thanks for any suggestions.
The page I need help with: [log in to see the link]
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس