z-blog首頁標題(title)與分類頁相同的問題
來源:程序員人生 發布時間:2014-02-07 17:32:36 閱讀次數:2965次
z-blog首頁標題(title)與分類頁標題(title)相同的原因是因為你安裝了TitleSEO插件導致的,這樣不僅不利于用戶體驗,而且對搜索引擎也極不友好,所以解決方法要從這個插件下手。
找到TitleSEO插件的所在目錄,z-blog的所在根目錄->plugin目錄->TitleSEO文件包,找到include.asp文件,然后找到如下代碼
我們打開include.asp這個文件,找到下面這段代碼:
Function TitleSEO_Catalog(ByRef Ftemplate)
If IsEmpty(Ftemplate) Then Exit Function
If Request.QueryString("cate") <> "" Or _
Request.QueryString("auth") <> "" Or _
Request.QueryString("date") <> "" Or _
Request.QueryString("tags") <> "" Then
Ftemplate = TitleSEO_ReplaceCode(Ftemplate,"<#BlogTitle#> <#ZC_MSG044#> <#ZC_BLOG_TITLE#>")
Else
Call TitleSEO_Default(Ftemplate)
End If
End Function
替換為以下代碼即可:
Function TitleSEO_Catalog(ByRef Ftemplate)
If IsEmpty(Ftemplate) Then Exit Function
If Request.QueryString("cate") <> "" Or Request.QueryString("auth") <> "" Or Request.QueryString("date") <> "" Or Request.QueryString("tags") <> "" Then
Ftemplate = TitleSEO_ReplaceCode(Ftemplate,"<#BlogTitle#> <#ZC_MSG044#> <#ZC_BLOG_TITLE#>")
elseif Request.QueryString("page") <> "" then
Call TitleSEO_Default(Ftemplate)
else
Ftemplate = TitleSEO_ReplaceCode(Ftemplate,"<#BlogTitle#> <#ZC_MSG044#> <#ZC_BLOG_TITLE#>")
end if
End Function