Design implementation for changing schema page/post type
Product owner: @thijsdevalk UX designer: @uxkai
What are we going to build?
Post/page editor We need to add a tab called “Schema” to our metabox and our sidebar.
Allow WebPage and Article editing
- On
Pagetypes, we should allow the user to alter theWebPagetype. - On
Posttypes (including custom posts), we should allow the user to alter theWebPagetype and theArticletype. - On custom post types, the default
Articlevalue should be ‘None’ - When a user selects ‘None’, then the node in question should not be output.
The valid options should be sourced from https://schema.org/WebPage and https://schema.org/Article respectively (in addition to the default options).
Search appearance settings In our Search Appearance > Content Types options, we should add similar controls which allow the user to set/override the default type for that post type.
Similarly to the in-post controls, Page types should only allow setting the WebPage, and Post types should also allow setting the Article type.
Which options can people choose from?
The options for WebPage:
Default for Posts* (Item Page)-> when for example Item Page is set as default on the settings pagesWeb PageItem PageAbout PageFAQ PageQA PageProfile PageContact PageMedical Web PageCollection PageCheckout PageReal Estate ListingSearch Results Page– None –
The options for Article:
Default for Posts* (Article)-> when for example Article is set as default on the settings pagesArticleSocial Media PostingNews ArticleAdvertiser Content ArticleSatirical ArticleScholarly ArticleTech ArticleReport– None –
*= or Pages, or other post types. It depends on the post type you're working with.
What problem does it solve?
Right now, users are not able to control any aspect of the schema output within our settings, whether that’s in the settings section, or within the post editor.
Designs
Functional prototype
- Post editor: Schema section in sidebar + Schema tab in metabox https://www.sketch.com/s/26aa4d89-ec08-4eed-97db-2f60d2db32cb/a/dpGWa3/play
(This FontAwesome icon is used in the metabox tab.)
- Search Appearance > Content Types https://www.sketch.com/s/26aa4d89-ec08-4eed-97db-2f60d2db32cb/a/bRWLr9/play
Design files
https://www.sketch.com/s/26aa4d89-ec08-4eed-97db-2f60d2db32cb
Wording considerations
- In the type selection dropdowns, we should use the human-readable names (as above) of each schema article/page type.
- In the Page/post editor, we should append (Default) to the default option for the post type in question (as inherited from the Search Appearance settings), and, pre-select this value in the selection interface.
Texts
Post/page editor We need a small amount of generic copy to introduce the tab/section, before / independent of the changing page/post capabilities. This should remain relevant as/when we add more features to this section (to maintain continuity and to minimize localisation overheads). Provisionally, that copy is:
Yoast SEO automatically describes your pages using schema.org (?) This helps search engines to understand your website and your content. You can change some of your settings for this page below.
The help link should point to https://yoast.com/structured-data-schema-ultimate-guide/ (until/unless we have something more specific).
Then, we need some copy specifically for the page/post setting changer. Provisionally, that copy is:
What type of page or content is this? (?) You can change the default type for
%post type plural%in your [%Search appearance settings URL%](Search Appearance settings).
- The help link will point to a pending KB article, which @jono-alderson aims to write soon.
- *Note the use of 'page or content' means we don't have to manage the different scenarios (pages vs posts, and page+article controls vs just page controls)
Search Appearance settings
Choose how your [pages|post_type_plural] should be described by default in your site's schema.org markup. You can change these settings for individual [pages|post_type_plural]. (?)
- The question mark icon will point to a pending KB article, which @jono-alderson aims to write soon.
@uxkai What posts should the question marks link to?
@IreneStr I discussed this with @jono-alderson. These docs are not written yet, but he'll add them to his to-do list.
@Yoast/research Can you please provide us with the correct UTM tags for the articles linked to with the question marks in the design. You can find the designs on sketch cloud above. In short, there will be 6 different links:
- Page type in metabox
- Article type in metabox
- Page type in sidebar
- Article type in metabox
- Page type in search appearance
- Article type in search appearance
As discussed with @jono-alderson there will be 5 links. I've created short links with the right UTM tags:
- Link to Ultimate guide from metabox: https://yoa.st/400
- Link to Ultimate guide from sidebar: https://yoa.st/401
- Link to new KB article from metabox: https://yoa.st/402
- Link to new KB article from sidebar: https://yoa.st/403
- Link to new KB article from the search appearance tab: https://yoa.st/404
Issues
- [ ] Create hidden input fields https://github.com/Yoast/wordpress-seo/issues/15229
- [ ] Create the schema component https://github.com/Yoast/wordpress-seo/issues/15230
- [ ] Output correct schema on the frontend https://github.com/Yoast/wordpress-seo/issues/15227
- [ ] Create the schema settings component https://github.com/Yoast/wordpress-seo/issues/15339
- [ ] Populate hidden input field with data from indexables table https://github.com/Yoast/wordpress-seo/issues/15350
- [ ] If post/page is saved: check if type is valid (/escape?) + write to indexables table https://github.com/Yoast/wordpress-seo/issues/15351
- [ ] Use defaults set in search appearance as default on specific page/post/custom post type post https://github.com/Yoast/wordpress-seo/issues/15352
- [ ] Handle schema default types on the search appearance tab https://github.com/Yoast/wordpress-seo/issues/15353
NB: do the above for pages, posts and custom post types.
Please inform the customer of conversation # 617085 when this conversation has been closed.
We made some slight changes to the designs. The design links in the issue above are now up-to-date!
In the Post Editor, we added Default for Posts (Item Page) to the dropdown list.
-> "Posts" can also be Pages, or other post types. It depends on the post type you're working with.
-> Item Page is in brackets, because in this example Item Page is set as 'Default Page type' for Posts on the Search Appearance settings.
In the Search Appearance settings, we added (default) behind the default setting in each dropdown list. In this case Web Page is the default setting.
When changing Default Schema settings on the Search Appearance settings, a warning alert appears with the copy: Upon saving, these settings will apply to all of your Posts. Posts that are manually configured will be left untouched.
Schema tab has shipped.