[Resolved] 404 with category without any post

Home Forums Support [Resolved] 404 with category without any post

Home Forums Support 404 with category without any post

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #757280
    Hans

    I use a menu item for categories. Sometimes there are no posts in the category. Instead of a message that there are no posts I get a 404 error. What can I do to avoid this behaviour and to get an appropriate message?

    #757617
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It should use the No Results template by default.

    So if you add a post to that category now and leave the URL as is, the post shows up?

    #757702
    Hans

    You are right. It shows the no reult template – sorry. I would prefer to show a message, that there is no result for the query. How can I do so?

    #757863
    Tom
    Lead Developer
    Lead Developer

    You can make a copy of this file: https://github.com/tomusborne/generatepress/blob/2.2.1/no-results.php

    Then upload it to your child theme root directory.

    Then you can go right into the file and make any needed changes.

    Let me know if you need more info ๐Ÿ™‚

    #757949
    Hans

    Thank you – this will help!

    #758407
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.