How would I build something like this with wordpress. Where multiple tags texts all go to the same page.
If you click on the tag “scifi” it takes you to tag “science fiction”. I am not looking for a way to merge them.
I want the tag text to vary, but the end page to be the same. Any Ideas?
A physical redirect shouldn’t be needed. The tag text of X needs to be linked to Y when wordpress builds the link.
Example: If I type “scifi” as a tag, and the link gets build as
<a href="/tag/science fiction">scifi</a>
and therefore the tag is an alias for “science fiction”.
Where would I hook in to do this?
Have not tested tested yet, but I see in the Codex page for wp_insert_term there’s one argument
alias_of
, which is described:Maybe it helps 😉
I guess the best would be to simply merge synonyms. You can use this plugin – @scribu is a trusted author.
I can use the term_link filter, for the linking half of this problem:
Here is a basic,still hard coded, version:
Now what is missing is pulling in the aliases on the tag pages