Support

Account

Home Forums General Issues Enhance user experience pre-selecting/toggling blocks.

Helping

Enhance user experience pre-selecting/toggling blocks.

  • Say I want to edit block “#5f199cacd9b12” inside of post #123: one way of doing so would be going in the backend, then “posts”, then finding and clicking the corresponding post. Once inside you still have to search for the block you are looking for (which may not be an easy task if you have 10+ blocks).

    In order to simplify the user experience of whoever is in charge of editing content I may place an edit_post_link() shortcut on the frontend (visible only to users with the right capabilities). By doing so the “go-to-the-backend-and-search-for-the-post” part has been skipped.

    Now I wonder: would it be possible to the same with blocks? For example, say I output on the frontend something like this: edit_post_link() . ?block=5f199cacd9b12. Would it be possible to place a hook (in the posts edit screens) that would allow me to check for the block parameter and then select/open/toggle the corresponding block?

  • It could probably be done in a similar way at this code that allows linking to a specific ACF tab https://www.justinsilver.com/technology/wordpress/acf-link-to-specific-tab/

    You just need to figure out what element needs to be automatically clicked.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Enhance user experience pre-selecting/toggling blocks.’ is closed to new replies.