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

\Timber\Post get_field method returns wrong post object #1462

Closed
JakubSzajna opened this issue Jun 23, 2017 · 1 comment
Closed

\Timber\Post get_field method returns wrong post object #1462

JakubSzajna opened this issue Jun 23, 2017 · 1 comment

Comments

@JakubSzajna
Copy link

get_field method of \Timber\Post returns \Timber\Post even when default post class is overriden by Timber\PostClassMap filter.

This can be easily fixed by using get_class($this) instead of __CLASS__ in get_field definition when method convert() is used.

@gchtr
Copy link
Member

gchtr commented May 3, 2023

We’ve reworked how post class filtering works in Timber 2.0, see https://timber.github.io/docs/v2/guides/class-maps/. If this issue still exists in 2.0, please open a new issue.

@gchtr gchtr closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants