Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

wpsamantha on "Redirect/forward page to latest taxonomy"

$
0
0

I have created a basic page with the slug /journal/.
I also have a custom taxonomy called 'issue' with terms that generates slugs in the following format:
* /journal/issue20/
* /journal/issue21/
* Etc...

I would like the page at /journal/ to redirect to the latest issue so in the above case, /journal/ would forward to /journal/issue21/ as long as 'issue21' has content and is not an empty term.

What is the best way to go about this without creating duplicate content?

My first thought was to setup a custom page template. The template would search the taxonomy terms from highest->lowest and the first one that has content would be queried. The page template would then include the taxonomy template. However, this would create duplicate content at /journal/ and /journal/issue21/.

My second thought was to setup a canonical redirect. Again, I would write code to determine the latest issue and then redirect to that issue. My concern here is that over time, the redirect will change as new issues are published. In my mind, a canonical redirect doesn't change over time.

Thoughts? Best practices?

In summary, I am trying to configure a 'latest issue' landing page without duplicating content.


Viewing all articles
Browse latest Browse all 8245

Trending Articles