forked from argoproject/Argo
-
-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Labels
good for beginnershacktoberfesthelp wantedpriority: lowNice-to-have in a release.Nice-to-have in a release.type: bug
Milestone
Description
Consider the following code:
largo_top_term( array('post' => 5 ) );Assuming that post 5 has a top term set, the top term returned will be that set on post 5.
If no top term is set on post 5, largo_top_term() calls largo_category_and_tags() to get a list of categories and tags. That function doesn't use post 5, but instead fetches terms from the get_the_ID() post, which in many situations (like the homepage) is not the post that we want terms for.
There are two situations to consider:
- On a largo_top_term() call with a specificied post that does not match the global post ID. In this situation, we should not call
largo_category_and_tags(), because its output will be wrong. - On a largo_top_term() call with no post specified,
largo_top_term()will get the post ID to use fromget_the_ID()the same aslargo_category_and_tags(). This use case includes the top term on single posts.
Identified during work on #1646
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good for beginnershacktoberfesthelp wantedpriority: lowNice-to-have in a release.Nice-to-have in a release.type: bug