Opened 6 years ago
Closed 6 years ago
#47025 closed defect (bug) (invalid)
Adding canonical tag feature
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.2 |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
Hello, I still use the classic editor in WordPress. While adding a hyperlink to text in post editor, the options that we get are only the link field and a check box for opening the link into a new tab. There should be one more option for adding a canonical tag. Currently, what I have to do is going to the text window and type rel=canonical manually.
Please add this feature.
Change History (2)
#1
@
6 years ago
- Component changed from General to TinyMCE
- Keywords close added
- Severity changed from major to normal
#2
@
6 years ago
- Keywords close removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Hi @haseeb007,
I just did some research, and it appears that @SergeyBiryukov is correct.
rel="canonical"
is only allowed as an attribute of the <link>
tag, which is only allowed within the <head>
tag (unless the type is body-ok
, which canonical
is not). Search engines have also been known to ignore any rel="canonical"
attributes found within the <body>
tag.
If this is no longer correct and you can provide some references demonstrating, this can be reopened and reevaluated!
Hi @haseeb007, welcome to WordPress Trac! Thanks for the ticket.
Unless I'm missing something,
<link rel="canonical">
should only be used in the<head>
section, not in the content area, so an option for adding a canonical tag does not belong in the content editor.