#4407 closed enhancement (fixed)
Integrate Optimal Title
Reported by: | cpoteet | Owned by: | ryan |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Optimization | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
One of the SEO horrors of the current WP scheme is the title template tag. The Optimal Title plugin does however circumvent this. Can we use such a methodology to create a new template tag or replace the old one?
Attachments (1)
Change History (20)
#2
@
17 years ago
- Milestone changed from 2.4 (future) to 2.3 (trunk)
- Owner changed from anonymous to rob1n
What I'm thinking is basically another argument for wp_title (right now we've got separator and display) which is an argument string that has order and so on.
Also, it would be nice if, on a 404, the text could be Not Found, or something more useful.
#3
@
17 years ago
Optimal title could be replaced by this code:
function optimal_title_filter($title, $sep) { $sections = explode(" $sep ", $title); array_push($sections, array_shift($sections)); $optimal_title = implode(" $sep ", $sections); return $optimal_title; } add_filter('wp_title','optimal_title_filter',10,2);
This filter would make the normal wp_title() call function in the same way as optimal title 3.0 does. Just add the filter when needed.
#5
@
17 years ago
@cpoteet: Not my call. I was just offering up code to use if the devs decide to put it in there. :)
#9
@
17 years ago
- Keywords has-patch added; 2nd-opinion removed
I decided instead of integration the explode/implode in the plugin to add a parameter as rob1n suggested.
Basically, it adds a parameter onto wp_title that determines the location of the separator. Acceptable values are 'right' or 'left' but defaults to it being on the left as it behaves now. The if/else check only looks at whether the separator is placed on the right and moves it.
What do you think?
#13
in reply to:
↑ 12
@
17 years ago
- Cc ryan added
Replying to ryan:
Let's just change the default.
So, should we scrap the parameter and just switch the ordering? Let me know Ryan, and I'll make the change.
#15
follow-up:
↓ 16
@
17 years ago
Actually, after looking at how various themes use wp_title(), we probably can't change the default. So, I think we can go with your current patch.
#16
in reply to:
↑ 15
@
17 years ago
Replying to ryan:
Actually, after looking at how various themes use wp_title(), we probably can't change the default. So, I think we can go with your current patch.
Ya, that's why I figured to keep the default as the legacy position. Maybe in a future release we could switch it indefinitely.
Thanks Ryan!
+1