Example Query Loop Button
Add Custom Fields to Buttons in the Query Loop
by bacoords · github.com/bacoords/example-query-loop-button · website
★ 13stars
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/bacoords/example-query-loop-button/archive/refs/heads/main.zipExample Query Loop Button Extension
Extends the button block to allow you to populate the href value automatically with the permalink or to a custom meta field. This is especially useful in the query loop, where you may want a custom button for your read more link.
This repo is part of a tutorial that teaches you how to:
- Add custom attributes (aka custom fields) to a core block, and
- Modify the final frontend markup of the block based on the attribute values