WordPress.org

Making WordPress.org

Opened 5 years ago

Closed 5 years ago

#554 closed enhancement (fixed)

Show gravatar on individual speaker page

Reported by: andywashere Owned by:
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords: good-first-bug
Cc:

Description

Currently, you have the option to show speaker gravatars on the page using the [speakers] shortcode, but not on individual pages. Gravatars should also be displayed on the individual speaker page if they're available.

Change History (5)

#1 @iandunn
5 years ago

One obstacle here is that the individual speaker pages are posts rather than shortcodes, so the HTML and CSS are primarily controlled by the theme template instead of the WordCamp Post Types plugin.

One workaround would be to filter the_content and inject the Gravatar HTML and also enqueue a stylesheet with some basic CSS that the theme could override, but that's kind of an ugly hack.

A better approach might be to look into the author meta. Some themes will display the author's Gravatar, so we could possibly hook into that and display the speaker's Gravatar instead. It probably wouldn't be supported by all of the themes, though.

That's just off the top of my head, though. Does anyone have a better idea?

#2 @andywashere
5 years ago

That's true. We'd need a custom single-speaker.php for each of the themes. Right now the speakers aren't users on the site but a custom post type, though I know the plan is to move that way going forward.

Filtering the_content would work, and would really only have to insert the gravatar HTML at the beginning. Might be worth holding off until speakers are users on the site, rather than a CPT.

#3 @iandunn
5 years ago

I think we might be able to do that now, since they're users on the network, even if they're not users on individual sites. r152 does something similar.

#4 @couturefreak
5 years ago

  • Cc oxo.codes@… added

#5 @iandunn
5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r933.

Note: See TracTickets for help on using tickets.