The issue below is related to php development.
Problem description:
News link (footer part)on top page,
https://domainname/blog/archives/category/news (a link to a category)
Is not consistent with news link on other pages
https://domainname/blog/archives/7041 (the number 7041 is subject to change)
Request
Modify the link on top page make it link to the newest post on news category.
Solution:
The technical problem is that top page is a html page which are static page.
Other pages are php page which are active.
So it is technical impossible to modify the link on top page to make the link "actively"
Get the newest post in news category.
One:
Change the top page from html to php page.
Two:
Modify wordpress code to make a redirection when
When users is visiting news category and the former link is top page.
We choose solution two because the scope influenced is low.
Two special techniques need to pay attention to
One:Where to put the code?
News.php (when visiting news category,use it)
Header.php
Put it in a plugin.(before the theme is loaded)---------worth to check it out later
Two:Which redirection method to use?
1. Use javascript to redirect
2.
Thoughts from this issue.
Consider a technique issue in different perspective.
Update:the solution above does not support chrome
Because $_SERVER [ 'HTTP_REFERER' ] get another value (because we use flash in top.html ).