• I am testing with theme Twenty Sixteen, which follows WordPress’s theme unit testing advice for title-less posts:

    (no title)
    Lack of post title should not adversely impact layout.
    Post permalink should be displayed. Making the post date a permalink is a great solution. See Twenty Ten for an example.

    This does not work with the Post Name permalink structure (http://myblog.com/blog/my-post-title/) or with any other permalink structure that includes the post title.

    A permalink is created for the title-less post using the post ID:

    http://myblog.com/blog/123/

    However because of the Post Name permalink structure, it is looking for a post titled 123, not a post with an ID of 123.

  • The topic ‘Theme unit testing irony: Post without title yields 404 with get_permalink()’ is closed to new replies.