Skip to content

look into using get_the_title() #17

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

Closed
willnorris opened this issue Dec 9, 2013 · 0 comments
Closed

look into using get_the_title() #17

willnorris opened this issue Dec 9, 2013 · 0 comments

Comments

@willnorris
Copy link
Collaborator

(This is mostly a note to myself to look into something @misterbisson said to me in an email that's been sitting in my inbox for over a year)

... I really shouldn't be using $object->post_title, rather get_the_title( get_queried_object_id() ). Since different post types can behave differently, even with respect to how a post is titled or how the title is changed on display, that's the most compatible method to get it.

pfefferle added a commit that referenced this issue Dec 29, 2014
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