#4276 closed defect (bug) (fixed)
Remove JavaScript title update on theme pages
Reported by: | jonoaldersonwp | Owned by: | ck3lee |
---|---|---|---|
Milestone: | Priority: | high | |
Component: | Theme Directory | Keywords: | seo |
Cc: |
Description (last modified by )
When pages like https://wordpress.org/themes/twentynineteen/ load, JavaScript is used to alter the page title from Twenty Nineteen - WordPress theme | WordPress.org
to {{theme name}} | WordPress.org
. This should be disabled on load.
When using JavaScript to navigate between themes (e.g., via the next/prev arrows), the title should be updated, but using the correct format ({{theme name}} - WordPress theme | WordPress.org
)
Attachments (2)
Change History (15)
#4
@
6 years ago
Attached my proposed patch. I'm concatenating two translation strings that already exist which is usually a no-no but I guess is somewhat fine in this particular case as they are already fragmented in document_title_parts
. It may be simpler to just introduce a new one though:
__( '%s - WordPress theme | WordPress.org', 'wporg-themes' )
This should be disabled on load.
I did a comparison with the current title which will match on first load and if the titles don't match the new one should be applied in any case anyway.
Any feedback will be appreciated.
#5
@
5 years ago
Added screenshot of the problematic titles that Google sees and adds in my feed. The page linked in the screenshot is https://wordpress.org/themes/bizlite-business/
#8
@
5 years ago
Looks sensible, though a little out of my depth. Maybe somebody smart like @coffee2code or @SergeyBiryukov could take a look? :)
I have seen strangeness occur because of this JavaScript. In my Google Now/Discover feed I often see misformed titles when they are highlighting certain themes for me.
In my case it tends to start
More info...
but I'm not able to see why it would be the case that Google considers that to be the title.I'll add a screenshot next time this misformed titke pops into my feed again.