Zblog top articles are only displayed on the home page

web front end seven thousand five hundred and ninety-five 12 years ago (2012-03-04)

use zblog If you want the top articles to be displayed only on the home page, you only need to modify c_system_lib under the FUNCTION folder ASP File.

Why are top posts displayed on all pages by default?

Some people say that there are top articles on the click page, column page, and search page, and it is unnecessary to display them on every page. Others say that from SEO From the perspective of, the display of pagination and classification pages is easy to be judged as similar pages by spiders, which affects the weight of websites.

In fact, whether from the perspective of user interaction or SEO, the problem of top articles is obvious. I don't like all pages to be displayed, so how to achieve it is very simple.

First, we open c_system_lib.asp with Dreamweaver or Notepad to find aryArticleList (i)=objArticle Location of Template_Article_Multi (Note: there are five aryArticleList (i)=objArticle in c_system_lib.asp Template_Article_Multi, what we want to modify is the fourth).

In the fourth code:
If objArticle. LoadCache Then
aryArticleList(i)=objArticle. Template_Article_Multi
End if

Replace with:
If Not IsEmpty(intCateId) Then
aryArticleList(i)=""
Else
aryArticleList(i)=objArticle. Template_Article_Multi
End If

After the replacement is successful, save and rebuild the file.