WordPress.org

Ready to get started?Download WordPress

Forums

Template problems (4 posts)

  1. designermonkey
    Member
    Posted 5 years ago #

    I have written a template, as far as I can see all the code is correct... however when i navigate to a category that has no content, instead of receiving a 404, i get nothing... no markup whatsoever.

    Has anyone seen this before, or know how to fix it?

  2. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Change to default theme, if you can see your content, then you will know that your customized template's code is not correct and that you will have to finetune it some more.

  3. designermonkey
    Member
    Posted 5 years ago #

    Thanks for the response mercime, but you obviously haven't read my problem.
    My code is working for all of the site, including 404's where i try and view a blog post that isn't there.
    When i try and view a category that I have added via admin, but not posted in, nothing shows up. I expect to get a 404 but nothing.
    This also happens in the default theme.
    Is this normal??
    I would expect my visitors to get at least a 404 telling them there is no content matching their query, not nothing!

    Examples:
    When I view: /category/gallery/ I get a list of posts with category.php, as I have posted to this category.
    When I view: /category/gallery/fine-art/ I get nothing, even though the category exists in admin. I expect a 404 as I have no posts in the category.

    Does this make sense now? Does anyone know what is wrong??

  4. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    When i try and view a category that I have added via admin, but not posted in, nothing shows up. I expect to get a 404 but nothing. This also happens in the default theme. Is this normal??

    Apologies for not getting your point the first time. Yes, it is quite normal that a category will not appear if there are no posts associated or attached to it because WordPress automatically "hides" categories which do not have any post assigned to such category.

Topic Closed

This topic has been closed to new replies.

About this Topic