Skip to content

look into using get_the_title() #17

@willnorris

Description

@willnorris

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions