Support » Theme: Singl » Show description on Tag and category page even when there are no posts

  • Resolved v1eren

    (@v1eren)


    I have a section for only registered users on my homepage.
    Posts that are for registered users only are not shown on the tag and category pages and when there are no posts nothing is shown.
    But when there is no content on these search engines occurre a soft 404 error and the pages don’t appear in search.
    So would it be possible to always show the category btw. the tag description on top? So there’s at least a little bit of content on those sites.

    • This topic was modified 2 weeks ago by  v1eren.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there –

    I’m not quite sure I understand the question. Please help me with some clarification.

    I have a section for only registered users on my homepage.

    Where is this at? Can I get there from the site menu? I don’t see anything that is restricted.

    But when there is no content on these search engines occurre a soft 404 error and the pages don’t appear in search.

    That is expected behavior. Anything that is restricted would be hidden from search engines.

    So would it be possible to always show the category btw. the tag description on top? So there’s at least a little bit of content on those sites.

    Send a link to the page where you want this information displayed and then I can take a closer look.

    For reference, your theme instructions are available here.

    Hi there,

    So would it be possible to always show the category btw. the tag description on top? So there’s at least a little bit of content on those sites.

    I don’t think this is possible, no. While this theme does display the category or tag description, that first depends on the archive page for the category or tag actually existing. But an archive page will only exist if there’s a publicly published post on the site in that particular archive.

    You might be able to add some code to functions.php to force the archive page to be created anyway and display the description, but I don’t know enough about WordPress taxonomies and archive pages to say whether that’s possible, and it’s also not something we’re able to help you with here.

    This feels like something for the advanced development subforum at https://wordpress.org/support/forum/wp-advanced/

    But the simpler option would be to just make sure you have at least one public post in every category. You can make it a stub – just a very basic short post with a bit more detail about the category, just to ensure the archive page for that category is created.

    @kokkieh I switched the restriction plugin so it shows a teaser of every post and of course the description of the category.

    Thank you both for your fast help.

    That would also work, yes.

    You’re very welcome 🙂

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