-
Notifications
You must be signed in to change notification settings - Fork 66
fix: add custom site titles #2486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a clean solution to make it extensible and works well! Left a few comments inline.
426760a
to
20f61ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes!
Hey @rbcorrales, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
## [2.9.1-alpha.1](v2.9.0...v2.9.1-alpha.1) (2025-05-23) ### Bug Fixes * add custom site titles ([#2486](#2486)) ([fc91ed9](fc91ed9)) * add filter to show the update date on post types ([#2484](#2484)) ([ec9c1bf](ec9c1bf)) * **category-links:** adjust category links to handle links in sponsor descriptions ([#2488](#2488)) ([882c271](882c271))
🎉 This PR is included in version 2.9.1-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [2.9.1](v2.9.0...v2.9.1) (2025-06-02) ### Bug Fixes * add custom site titles ([#2486](#2486)) ([fc91ed9](fc91ed9)) * add filter to show the update date on post types ([#2484](#2484)) ([ec9c1bf](ec9c1bf)) * **category-links:** adjust category links to handle links in sponsor descriptions ([#2488](#2488)) ([882c271](882c271))
🎉 This PR is included in version 2.9.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Fixes the site title displayed for multibranded sites. It introduces a new custom site title functionality that allows filtering both the site name and URL using hooks. This is used to address an issue with handling multi-branded site title links, where the rendered URL points to the site's root instead of the brand's root.
The implementation includes:
newspack_site_title()
function that supports custom site names and URLs via filters, similar to the existingnewspack_the_custom_logo()
function.site-branding.php
to use this new function and avoid duplication.newspack_site_title_name
: For filtering the site name that appears within the site title section.newspack_site_title_url
: For filtering the home URL that is linked by the site title.newspack_site_title
: For filtering the wholenewspack_site_title()
function at the end.How 8000 to test the changes in this Pull Request:
newspack_site_title_name
to modify the site name.newspack_site_title_url
to modify the site URL.newspack_site_title
to modify the entire site title HTML.localhost/my-brand
instead of justlocalhost/
), just like the header logo link.Other information: