I’ve noticed in the video on WordPress development (Building a Wordpress Theme - Section 5 - Post Page - YouTube) that the custom attribute “blocs-wp-post-thumb” is being used. However I found no documentation at all about this custom attribute (or other potential custom attributes that apply to WordPress theming in Blocs) in the current documentation on WordPress.
Would it be possible to provide some documentation or a list of available custom attributes for WordPress theming?
Also, these custom attributes might open up possibilities to allow more things to be added to the customizer (Theme Customization API « WordPress Codex), for example:
blocs-wp-background-color to allow for a color selector in the customizer.
Several things I’m thinking about, but don’t know how feasible they are. The ones highest on my list of requests would be:
Background color per bloc/section
Adding a shortcode to a text-element that enables a editable text-field in the customizer. Let’s say you make a 3-columns layout with key selling points. This would make the text editable from the customizer, even if you already have 1 loop on the page.
That’s one way of implementing this. The downside (in my point of view) would be the usability for the end user. My type of end users is able to use the customizer (and get’s access to it) but custom fields is quite a bit less user friendly / requires some more experience.
I was actually thinking more in terms of a global field, for example in the footer.
This article has a great example that show the “copyright text” as a field in the customizer (including example code): The WordPress Theme Customizer: a Comprehensive Developer’s Guide – Theme Foundation. Especially for use in global area’s I think this would be useful.
Again, I don’t know how feasible, but the field could be announced in the customizer as “(bloc id) text”. So if my footer’s id was “footer”, it could perhaps appear in the customizer as the “footer text” field?
Thanks for the reply, I had found that page in the knowledge base.
However, what I was looking for was a list of the custom attributes for Wordpress such as “blocs-wp-post-thumb”.
I am also looking for this, I am following along with the tutorial / section 6 page template and it’s not working as expected. I wanted to verify I had the attribute correct.