Share Code Viết Nội Dung Chỉ Google Bot Mới Thấy Cho Xtgem
Code này
hiện thị nội dung chỉ dành cho google bot
với một số đoạn tag seo không muốn người dùng thấy thì nên dùng code này để wap đẹp hơn trong mắt người dùng và seo tốt trong mắt googlebot . Hoặc có thể làm j khác thì tùy các bạn<!--parser:xtscript-->
var $bot = {{<xt:browser detail="1" />}}
var $bot = call strtolower $val=$bot
#Google
if $bot == googlebot
print {{Nội Dung Google Bot Nhìn Thấy}}
endif
<!--/parser:xtscript-->
var $bot = {{<xt:browser detail="1" />}}
var $bot = call strtolower $val=$bot
if $bot == googlebot
print {{Nội Dung Google Bot Nhìn Thấy}}
endif
<!--/parser:xtscript-->
CODE chỉ khách thấy và bot không thấy
<!--parser:xtscript-->
var $bot = {{<xt:browser detail="1" />}}
var $bot = call strtolower $val=$bot
#Google
if $bot == googlebot
print
else
#guest
print {{Nội Dung Người Dùng Thấy}}
endif
<!--/parser:xtscript-->
var $bot = {{<xt:browser detail="1" />}}
var $bot = call strtolower $val=$bot
if $bot == googlebot
else
#guest
print {{Nội Dung Người Dùng Thấy}}
endif
<!--/parser:xtscript-->
Hoặc code nếu là bot sẽ hiện nội dung dành cho bot. Nếu là khách sẽ hiện nội dung cho khách
<!--parser:xtscript-->
var $bot = {{<xt:browser detail="1" />}}
var $bot = call strtolower $val=$bot
#Google
if $bot == googlebot
print {{<b>Nội Dung Google Bot Nhìn Thấy</b>}}
else
#guest
print {{<b>Nội Dung Người Dùng Thấy</b>}}
endif
<!--/parser:xtscript-->
var $bot = {{<xt:browser detail="1" />}}
var $bot = call strtolower $val=$bot
if $bot == googlebot
print {{<b>Nội Dung Google Bot Nhìn Thấy</b>}}
else
#guest
print {{<b>Nội Dung Người Dùng Thấy</b>}}
endif
<!--/parser:xtscript-->