Documentation for Context

Here is general feedback after going through the docs:

The Context section discusses an “example” but the details are limited.

The blog tutorial. Has an excellent Context example. It refers you to the context section of the docs for more info, but I think there is less info in that section. I might refer people from the Context section to the blog tutorial.

The other thing that was a little confusing was Repeatable Content vs Context. In the Components section, there is a discussion on functions, for example get_the_post_thumbnail_url. But the blog tutorial uses the_post_thumbnail_url(). Is there a difference between these functions?

The tutorial states:

As a side-note, Gust does come with some pre-built components that could do this for you, but we wouldn’t be learning much doing that now would we!

But I didn’t realize there were post components until after I finished the tutorial and was looking for a container to wrap my 3 new post cards. Could be I was too excited to see if I could get the tutorial to work.

I was digging into Repeatable Content & Components, but I really only needed Context & the blog example.

I’m a WP Query API newbie, so take that into account. Overall, the docs have been easy to understand and using the page builder has been intuitive.

This feedback is super helpful, thanks!

I can see how Repeatable content and Context could be easily confused. I’ll have a look over the documentation and update it to be clearer, as well as providing links to the various tutorials and highlighting that there are some components that already exist. I actually recently added examples for each component individually, which didn’t exist at the time those articles were written, so I can update those articles to include links to the post cards.

The difference between get_the_post_thumbnail_url and the_post_thumbnail_url() as you’ve described them is really just naming conventions. In Gust the user would select the_post_thumbnail_url() but under the hood we actually use get_the_post_thumbnail_url. The former echos the URL immediately and the latter just returns it, which is why we use the latter, so that we can run it through sanitisation etc. I’ll update the docs ( and maybe even the UI ) to more accurately reflect what we’re using.

1 Like