Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a metadates template part #23

Closed
bobbingwide opened this issue Nov 7, 2020 · 1 comment
Closed

Create a metadates template part #23

bobbingwide opened this issue Nov 7, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

In the genesis-a2z theme we display the Published date ( post_date ) and Last updated date ( post_modified ) at the bottom of the content.
This is followed by an (Edit) link, which enables authorised users to edit the content.

Published: November 6, 2020 | Last updated: November 6, 2020 (Edit)

Requirement

  • To display this information in a template area between the content and the information
  • Date values to be formatted using the site settings
  • Labels either to be text in the template or translatable strings in the theme
  • (Edit) link to only be displayed to authorised users

Proposed solution

  • implement a new template part called metadates.
    eg
<p>Published: [bw_fields post_date] | Last updated: [bw_fields post_modified] ( edit )</p>
  • update style.css / experimental-theme.json as required

Since:

  • we are dependent upon oik and oik-fields to display the post meta data in the Information box
  • we use oik-blocks to display block icons

in the short term solution for the date fields can be implemented as shortcodes such as [bw_field] or [bw_fields]
which could then be implemented in the oik-blocks/fields block.

The (Edit) link should be a separate shortcode ( bw_edit ) / block ( post-edit )

In the longer term I'd expect these to be implemented as core/post-date, core/post-modified and core/post-edit blocks.

I believe that some of these requirements have already been raised by members of the theme-experiments projects.

@bobbingwide bobbingwide added the enhancement New feature or request label Nov 7, 2020
@bobbingwide bobbingwide self-assigned this Nov 7, 2020
bobbingwide added a commit that referenced this issue Nov 10, 2020
bobbingwide added a commit that referenced this issue Nov 10, 2020
@bobbingwide
Copy link
Owner Author

This was delivered in v0.0.7. It's been updated in #72 to use the row variation of group block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant