Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Conversation

ndiego
Copy link

@ndiego ndiego commented Aug 21, 2020

When a post has no category assigned to it, not even the default Uncategorized category that WordPress assigns, the _s_entry_footer() function still outputs "Posted on Uncategorized". This PR fixes that.

It appears as if this function was intended to display nothing when a post has no categories since it is checking if $categories_list exists. The problem is this variable is set to "Uncategorized" by default if the post has no categories assigned. In this PR, we are simply adding the has_category() check to the conditional. Then, when a post has no categories, nothing is displayed as expected!

When a post had no category assigned, the _s_entry_footer() function would still output "Posted on Uncategorized". This commit fixes that.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant