Make WordPress Core

Opened 6 years ago

Last modified 19 months ago

#10432 new enhancement

Dynamic classes for current blog post item, current term item

Reported by: dnusim Owned by:
Milestone: Future Release Priority: low
Severity: minor Version: 3.0.1
Component: Themes Keywords: needs-patch
Focuses: template Cc:


wp_list_pages() produces a class .current_page_item for the page you are currently viewing. This makes it possible to style the current page item different from the other page items in the list.

But there are several other places the same functionality would come in handy: There should be equivalent ways to style the current blog post item in the Recent Posts widget, the current category in wp_list_categories(), and the current tag in wp_tag_cloud('format=list').

Attachments (1)

current-tag.patch (1.6 KB) - added by edward mindreantre 5 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 @junsuijin6 years ago

This should apply for all types of wp_list_objects() and wp_object_cloud()s then. Archives, tags, cats, custom taxonomies, etc.

comment:2 @Denis-de-Bernardy6 years ago

  • Component changed from General to Template
  • Keywords needs-patch added
  • Milestone changed from Unassigned to Future Release
  • Priority changed from normal to low
  • Severity changed from normal to minor

comment:3 @edward mindreantre5 years ago

  • Cc edward mindreantre added

Current page and category is already marked out.

Seems like only current-tag was missing. Here you go.

comment:4 @edward mindreantre5 years ago

  • Keywords has-patch added; needs-patch removed

comment:5 @Sparanoid5 years ago

  • Version changed from 2.8.1 to 3.0.1

This feature is still missing in 3.0.1?

comment:6 @Sparanoid5 years ago

  • Keywords needs-patch added; has-patch removed

comment:7 @nacin19 months ago

  • Component changed from Template to Themes
  • Focuses template added
Note: See TracTickets for help on using tickets.