I have a regular categories widget (or "block" in the new terminology), that creates a <ul>
with my categories.
I want to add a fake category for linkbuilding reasons, an entry to this list that points to an external URL.
How can I do?
I found only the_category_list hook but it doesn't seem to do what I need...
Tried also with the filters widget_categories_args
and block_categories_all
and but they are not called. (wp 6.0)
the_category_list
filters the list of categories on a given post, eg, for display on a single post. I think you're looking for theget_terms
filter, which filters the list of terms in a given taxonomy (in your case, the taxonomy iscategory
).