Skip to content

Fix avatar rendering in Mastodon theme and always show filters#615

Merged
akirk merged 1 commit intomainfrom
fix/mastodon-theme-avatars-and-filters
Mar 26, 2026
Merged

Fix avatar rendering in Mastodon theme and always show filters#615
akirk merged 1 commit intomainfrom
fix/mastodon-theme-avatars-and-filters

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Mar 26, 2026

Screenshot 2026-03-26 at 11 06 57

Summary

  • Fix avatars not rendering in the Mastodon theme — the CSS selector .card-header .avatar matched both the wrapper <div class="avatar"> and the <img class="avatar"> (added by WordPress's get_avatar()), causing the img to get position: absolute and its width to collapse to 0 via max-width: 100%
  • Apply the missing friends_author_avatar_url filter in the non-status header template and prefer the stored avatar URL over get_avatar() fallback
  • Remove the chips toggle button and always show the filter/chips area in the Mastodon theme

Refs #596.

Test plan

  • Verify avatars display correctly in the Mastodon theme for both status and non-status posts
  • Verify avatars still work in the default theme
  • Verify the filter chips area is always visible (no toggle button) in the Mastodon theme
  • Check reblog/boost posts show correct avatar overlay

The avatar CSS selector `.card-header .avatar` was matching both the
wrapper div and the img element (WordPress adds class="avatar" to the
img), causing the img to get position:absolute and its width to collapse
to 0 via max-width:100%. Fix by targeting `> div.avatar` specifically.

Also apply the missing friends_author_avatar_url filter in the non-status
header template and prefer the stored avatar URL over get_avatar().

Remove the chips toggle button and always show the filter/chips area
in the Mastodon theme. Refs #596.
@github-actions
Copy link
Copy Markdown
Contributor

Test this PR in WordPress Playground

You can test this pull request directly in WordPress Playground:

Launch WordPress Playground

This will install and activate the plugin with the changes from this PR.

@akirk akirk merged commit ccda819 into main Mar 26, 2026
25 checks passed
@akirk akirk deleted the fix/mastodon-theme-avatars-and-filters branch March 26, 2026 10:10
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.

1 participant