Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved the category output on posts #1460

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Improved the category output on posts #1460

wants to merge 1 commit into from

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant