Skip to content

Add Timber::get_post_by_slug() and Timber::get_post_by_title() functions #2152

@gchtr

Description

@gchtr

Is your feature request related to a problem? Please describe.

Per the discussion in #2073 (comment), we should add an alternative to passing a post slug or title to Timber::get_post(), because that won’t be supported anymore in Timber 2.0.

Describe the solution you’d like

  • Add Timber::get_post_by_slug().
  • Add Timber::get_post_by_title().
  • Update Upgrade Guide.

Describe alternatives you’ve considered

See #2073 (comment).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions