• Resolved presswolfe

    (@presswolfe)


    Hi,

    In the Hueman Theme, I want to add a message such as “There are no posts” on a category page if the category currently doesn’t have any posts in it. Also I would like to include some text below the message that will point the user to another URL.

    Is there a simple way to code this? Which file should I edit in order to do this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter presswolfe

    (@presswolfe)

    @alexander Agnarson

    Hi Alex, no replies from anyone else on this yet. Is there a way that I can show the message “no posts” in a category that hasn’t any posts in it?

    Hi,

    In archive.php, on line 25, locate:

    <?php endif; ?>

    Replace with:

    <?php else: ?>
    <p>Nothing here</p>
    <?php endif; ?>

    Thread Starter presswolfe

    (@presswolfe)

    Awesome. It worked. Thank you!

    Thread Starter presswolfe

    (@presswolfe)

    How can I apply a CSS style to the text?

    I’m having trouble with the code applying the CSS within the PHP file.

    Thread Starter presswolfe

    (@presswolfe)

    Ahhh nevermind. Figured it out. Just had to put the defined CSS styles at the top of the “archive.php” and applied the class names to the tags.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to show "No posts" message in category page’ is closed to new replies.