$list_IP_entry
array(295) {
  [0]=>
  string(27) "66.249.64.80, 172.70.34.224"
  [1]=>
  string(29) "129.146.158.17, 172.69.34.160"
  [2]=>
  string(27) "5.45.207.154, 172.68.10.206"
  [3]=>
  string(27) "66.249.64.94, 172.68.65.132"
  [4]=>
  string(29) "157.55.39.66, 162.158.106.184"
  [5]=>
  string(27) "66.249.64.64, 172.70.34.224"
  [6]=>
  string(31) "114.119.146.114, 172.70.142.204"
  [7]=>
  string(28) "185.191.171.44, 172.68.65.94"
  [8]=>
  string(30) "103.131.71.193, 162.158.166.31"
  [9]=>
  string(29) "88.198.25.244, 162.158.93.141"
  [10]=>
  string(53) "2402:800:629c:d9b4:455a:f884:3beb:9b1, 162.158.179.95"
  [11]=>
  string(54) "2402:800:629c:d9b4:455a:f884:3beb:9b1, 162.158.178.168"
  [12]=>
  string(30) "207.46.13.146, 162.158.106.184"
  [13]=>
  string(30) "207.46.13.146, 162.158.146.202"
  [14]=>
  string(28) "114.119.129.7, 172.70.142.54"
  [15]=>
  string(30) "198.204.238.212, 172.69.68.218"
  [16]=>
  string(29) "87.250.224.191, 172.68.10.206"
  [17]=>
  string(31) "114.119.129.82, 162.158.166.131"
  [18]=>
  string(28) "162.55.86.61, 162.158.94.228"
  [19]=>
  string(28) "34.234.54.252, 172.70.34.156"
  [20]=>
  string(28) "34.234.54.252, 172.70.134.96"
  [21]=>
  string(28) "34.234.54.252, 172.70.134.18"
  [22]=>
  string(28) "34.234.54.252, 172.70.42.144"
  [23]=>
  string(28) "185.191.171.37, 172.69.63.87"
  [24]=>
  string(29) "138.99.38.105, 172.70.110.116"
  [25]=>
  string(29) "138.99.38.105, 172.70.114.160"
  [26]=>
  string(29) "138.99.38.105, 172.70.110.152"
  [27]=>
  string(29) "138.99.38.105, 172.70.110.186"
  [28]=>
  string(27) "117.5.146.35, 172.70.143.75"
  [29]=>
  string(53) "2402:800:63ba:a1b9:1591:a560:f2f0:6d03, 172.70.143.75"
  [30]=>
  string(30) "157.55.39.108, 162.158.146.202"
  [31]=>
  string(30) "103.131.71.225, 162.158.166.31"
  [32]=>
  string(27) "27.68.32.65, 172.70.188.250"
  [33]=>
  string(29) "198.52.32.64, 162.158.187.230"
  [34]=>
  string(29) "198.52.32.64, 108.162.237.137"
  [35]=>
  string(29) "198.52.32.64, 162.158.187.144"
  [36]=>
  string(28) "198.52.32.64, 108.162.238.56"
  [37]=>
  string(28) "198.52.32.64, 108.162.238.32"
  [38]=>
  string(28) "88.198.25.244, 162.158.90.21"
  [39]=>
  string(28) "185.191.171.33, 172.70.34.41"
  [40]=>
  string(30) "157.55.39.108, 162.158.106.185"
  [41]=>
  string(27) "162.55.86.61, 162.158.91.14"
  [42]=>
  string(30) "107.173.200.47, 108.162.215.53"
  [43]=>
  string(30) "185.116.172.83, 162.158.94.113"
  [44]=>
  string(30) "185.116.172.83, 162.158.92.105"
  [45]=>
  string(30) "185.116.172.83, 162.158.89.212"
  [46]=>
  string(29) "185.116.172.83, 162.158.91.14"
  [47]=>
  string(29) "168.119.140.252, 162.158.90.3"
  [48]=>
  string(31) "114.119.129.218, 162.158.167.91"
  [49]=>
  string(28) "82.80.230.228, 162.158.92.79"
  [50]=>
  string(28) "14.177.116.64, 172.70.188.21"
  [51]=>
  string(27) "40.77.167.74, 172.70.34.225"
  [52]=>
  string(28) "5.255.253.162, 172.68.10.207"
  [53]=>
  string(30) "114.119.129.229, 172.70.147.99"
  [54]=>
  string(29) "108.5.183.203, 173.245.52.206"
  [55]=>
  string(29) "108.5.183.203, 162.158.62.140"
  [56]=>
  string(29) "108.5.183.203, 172.70.110.187"
  [57]=>
  string(29) "87.250.224.191, 172.68.10.207"
  [58]=>
  string(28) "66.249.64.129, 172.68.65.133"
  [59]=>
  string(29) "116.109.90.164, 172.70.143.90"
  [60]=>
  string(29) "103.131.71.56, 162.158.166.32"
  [61]=>
  string(30) "114.119.130.29, 172.70.188.201"
  [62]=>
  string(28) "207.46.13.91, 172.70.211.122"
  [63]=>
  string(28) "88.198.25.244, 162.158.91.70"
  [64]=>
  string(32) "114.119.129.235, 162.158.165.105"
  [65]=>
  string(29) "103.131.71.90, 172.70.147.141"
  [66]=>
  string(28) "185.191.171.11, 172.70.34.41"
  [67]=>
  string(29) "207.46.13.80, 162.158.106.185"
  [68]=>
  string(31) "114.119.129.208, 172.70.147.155"
  [69]=>
  string(28) "168.119.3.58, 162.158.90.215"
  [70]=>
  string(29) "87.250.224.120, 172.68.10.207"
  [71]=>
  string(26) "162.55.86.61, 141.101.76.9"
  [72]=>
  string(30) "104.222.149.62, 172.70.174.195"
  [73]=>
  string(30) "104.222.149.62, 172.70.175.156"
  [74]=>
  string(29) "104.222.149.62, 172.70.134.93"
  [75]=>
  string(29) "104.222.149.62, 172.70.34.157"
  [76]=>
  string(28) "116.96.45.190, 172.70.142.55"
  [77]=>
  string(30) "103.131.71.129, 172.70.143.104"
  [78]=>
  string(32) "114.119.129.208, 162.158.167.219"
  [79]=>
  string(29) "103.131.71.75, 162.158.166.32"
  [80]=>
  string(30) "114.119.129.218, 172.70.147.53"
  [81]=>
  string(29) "88.198.25.244, 162.158.91.158"
  [82]=>
  string(30) "207.46.13.108, 162.158.106.185"
  [83]=>
  string(30) "103.131.71.195, 172.70.147.141"
  [84]=>
  string(27) "40.77.167.80, 172.68.65.133"
  [85]=>
  string(27) "88.99.150.47, 162.158.92.49"
  [86]=>
  string(29) "114.119.129.22, 172.70.188.37"
  [87]=>
  string(28) "66.249.66.154, 172.70.174.83"
  [88]=>
  string(28) "162.55.86.61, 162.158.88.223"
  [89]=>
  string(27) "185.191.171.9, 172.70.34.41"
  [90]=>
  string(29) "114.119.129.22, 172.70.189.90"
  [91]=>
  string(27) "40.77.167.80, 172.70.135.50"
  [92]=>
  string(30) "103.131.71.102, 172.70.147.141"
  [93]=>
  string(27) "40.77.167.80, 172.70.174.83"
  [94]=>
  string(31) "114.119.129.225, 172.70.142.205"
  [95]=>
  string(27) "66.249.66.72, 172.70.135.50"
  [96]=>
  string(28) "103.131.71.88, 172.70.188.99"
  [97]=>
  string(28) "162.55.86.61, 162.158.203.66"
  [98]=>
  string(28) "116.98.183.79, 172.70.92.249"
  [99]=>
  string(29) "103.131.71.153, 172.70.188.99"
  [100]=>
  string(28) "40.77.167.11, 162.158.78.241"
  [101]=>
  string(29) "103.131.71.238, 172.70.188.99"
  [102]=>
  string(29) "88.198.25.244, 162.158.90.119"
  [103]=>
  string(28) "162.55.86.61, 162.158.89.180"
  [104]=>
  string(28) "162.55.86.61, 162.158.90.155"
  [105]=>
  string(30) "114.119.129.208, 172.70.143.76"
  [106]=>
  string(30) "104.171.149.58, 108.162.219.57"
  [107]=>
  string(30) "103.131.71.224, 172.70.143.104"
  [108]=>
  string(30) "157.55.39.218, 162.158.106.185"
  [109]=>
  string(31) "114.119.129.235, 172.70.147.149"
  [110]=>
  string(30) "181.177.121.122, 162.158.62.56"
  [111]=>
  string(29) "103.131.71.93, 172.70.147.141"
  [112]=>
  string(28) "162.55.86.61, 141.101.105.25"
  [113]=>
  string(28) "93.158.161.76, 172.68.10.207"
  [114]=>
  string(30) "114.119.129.233, 172.70.188.37"
  [115]=>
  string(29) "157.55.39.25, 162.158.146.203"
  [116]=>
  string(30) "103.131.71.166, 172.70.143.104"
  [117]=>
  string(29) "157.55.39.25, 162.158.106.185"
  [118]=>
  string(27) "72.79.58.186, 172.70.230.37"
  [119]=>
  string(28) "72.79.58.186, 172.70.230.111"
  [120]=>
  string(29) "66.249.69.212, 172.70.130.215"
  [121]=>
  string(29) "185.191.171.16, 172.70.34.157"
  [122]=>
  string(30) "103.131.71.141, 172.70.147.141"
  [123]=>
  string(30) "114.119.150.215, 172.70.142.55"
  [124]=>
  string(54) "2001:ee0:4101:c816:1cf2:d02:dbcf:4691, 162.158.179.205"
  [125]=>
  string(28) "40.77.167.74, 162.158.78.241"
  [126]=>
  string(30) "103.131.71.156, 162.158.163.68"
  [127]=>
  string(29) "114.119.150.22, 172.70.147.27"
  [128]=>
  string(27) "40.77.167.74, 172.70.135.50"
  [129]=>
  string(30) "116.102.132.211, 172.70.147.27"
  [130]=>
  string(28) "162.55.86.61, 162.158.91.132"
  [131]=>
  string(31) "114.119.150.208, 172.70.147.149"
  [132]=>
  string(28) "103.131.71.84, 172.70.188.99"
  [133]=>
  string(28) "118.71.91.191, 172.70.189.38"
  [134]=>
  string(29) "103.131.71.187, 172.70.188.99"
  [135]=>
  string(29) "207.46.13.75, 162.158.146.203"
  [136]=>
  string(28) "162.55.86.61, 162.158.90.233"
  [137]=>
  string(29) "114.119.150.226, 172.70.142.5"
  [138]=>
  string(29) "207.46.13.75, 162.158.106.185"
  [139]=>
  string(30) "103.131.71.101, 162.158.178.87"
  [140]=>
  string(30) "114.119.159.135, 172.70.143.72"
  [141]=>
  string(28) "66.249.64.176, 172.70.34.225"
  [142]=>
  string(28) "162.55.86.61, 172.70.251.148"
  [143]=>
  string(29) "207.46.13.16, 162.158.106.185"
  [144]=>
  string(29) "207.46.13.16, 162.158.146.203"
  [145]=>
  string(29) "103.131.71.59, 162.158.178.87"
  [146]=>
  string(28) "185.191.171.43, 172.70.34.53"
  [147]=>
  string(30) "114.119.150.209, 172.70.143.46"
  [148]=>
  string(30) "185.191.171.42, 162.158.79.120"
  [149]=>
  string(29) "14.188.124.30, 172.70.188.245"
  [150]=>
  string(28) "14.188.124.30, 172.70.143.96"
  [151]=>
  string(30) "103.131.71.158, 162.158.178.87"
  [152]=>
  string(31) "114.119.159.135, 172.70.189.134"
  [153]=>
  string(28) "162.55.86.61, 162.158.92.131"
  [154]=>
  string(30) "110.249.202.99, 108.162.246.48"
  [155]=>
  string(55) "2402:800:61ad:ce2f:3425:e2b6:80e8:75ed, 162.158.178.142"
  [156]=>
  string(28) "5.255.231.207, 141.101.76.35"
  [157]=>
  string(29) "103.131.71.65, 162.158.178.87"
  [158]=>
  string(32) "114.119.150.215, 162.158.162.187"
  [159]=>
  string(30) "185.191.171.19, 172.70.135.202"
  [160]=>
  string(29) "88.198.25.244, 172.70.246.125"
  [161]=>
  string(30) "185.191.171.42, 172.70.134.195"
  [162]=>
  string(30) "114.119.150.226, 172.70.189.38"
  [163]=>
  string(31) "172.120.11.129, 162.158.178.221"
  [164]=>
  string(30) "172.120.11.129, 162.158.166.73"
  [165]=>
  string(30) "103.131.71.183, 162.158.178.87"
  [166]=>
  string(30) "103.131.71.137, 162.158.178.87"
  [167]=>
  string(28) "162.55.86.61, 162.158.90.149"
  [168]=>
  string(27) "51.158.99.76, 108.162.229.9"
  [169]=>
  string(30) "114.119.150.208, 172.70.143.96"
  [170]=>
  string(28) "23.94.224.241, 172.70.206.31"
  [171]=>
  string(28) "23.94.224.241, 172.70.211.74"
  [172]=>
  string(29) "23.94.224.241, 172.70.214.113"
  [173]=>
  string(28) "23.94.224.241, 172.70.206.99"
  [174]=>
  string(28) "23.94.224.241, 172.69.33.213"
  [175]=>
  string(28) "23.94.224.241, 172.69.33.131"
  [176]=>
  string(29) "103.131.71.79, 162.158.178.87"
  [177]=>
  string(29) "157.55.39.75, 162.158.106.185"
  [178]=>
  string(28) "5.255.253.118, 141.101.76.35"
  [179]=>
  string(30) "114.119.150.215, 172.70.92.235"
  [180]=>
  string(26) "161.0.2.166, 172.70.114.37"
  [181]=>
  string(27) "161.0.2.166, 172.70.230.125"
  [182]=>
  string(29) "114.119.150.215, 172.70.93.17"
  [183]=>
  string(28) "88.99.150.47, 162.158.92.213"
  [184]=>
  string(30) "103.131.71.146, 162.158.178.87"
  [185]=>
  string(29) "66.249.64.190, 162.158.78.241"
  [186]=>
  string(32) "114.119.150.208, 162.158.170.133"
  [187]=>
  string(31) "181.177.122.232, 172.70.114.239"
  [188]=>
  string(29) "185.191.171.22, 172.70.174.75"
  [189]=>
  string(30) "114.119.144.36, 172.70.147.200"
  [190]=>
  string(29) "17.121.112.159, 172.70.126.97"
  [191]=>
  string(29) "17.121.115.57, 172.70.211.122"
  [192]=>
  string(30) "103.131.71.166, 162.158.178.87"
  [193]=>
  string(29) "114.119.150.22, 172.70.142.81"
  [194]=>
  string(28) "95.181.238.53, 172.70.110.67"
  [195]=>
  string(29) "95.181.238.53, 172.70.110.161"
  [196]=>
  string(28) "207.46.13.3, 162.158.106.185"
  [197]=>
  string(31) "193.235.141.23, 162.158.222.123"
  [198]=>
  string(28) "45.15.129.112, 172.70.206.31"
  [199]=>
  string(28) "23.254.90.243, 172.70.230.81"
  [200]=>
  string(30) "103.131.71.129, 162.158.178.87"
  [201]=>
  string(30) "114.119.150.208, 172.70.143.46"
  [202]=>
  string(28) "87.250.224.77, 141.101.76.35"
  [203]=>
  string(28) "95.108.213.31, 141.101.76.35"
  [204]=>
  string(28) "162.55.86.61, 172.70.242.187"
  [205]=>
  string(30) "114.119.150.22, 172.70.188.147"
  [206]=>
  string(29) "3.238.180.255, 172.70.175.168"
  [207]=>
  string(30) "103.131.71.174, 162.158.178.87"
  [208]=>
  string(29) "14.231.128.217, 172.70.142.81"
  [209]=>
  string(30) "114.119.144.36, 172.70.188.147"
  [210]=>
  string(29) "45.148.189.179, 172.70.61.159"
  [211]=>
  string(29) "45.148.189.179, 172.70.59.147"
  [212]=>
  string(30) "123.28.28.144, 162.158.170.241"
  [213]=>
  string(30) "195.201.12.243, 172.70.251.148"
  [214]=>
  string(30) "103.131.71.224, 162.158.178.87"
  [215]=>
  string(30) "114.119.159.135, 172.70.188.97"
  [216]=>
  string(29) "185.191.171.44, 172.70.134.17"
  [217]=>
  string(29) "185.191.171.2, 172.70.174.231"
  [218]=>
  string(28) "162.55.86.61, 162.158.89.134"
  [219]=>
  string(30) "207.46.13.134, 162.158.146.203"
  [220]=>
  string(29) "114.119.144.36, 172.70.143.46"
  [221]=>
  string(30) "103.131.71.230, 162.158.178.87"
  [222]=>
  string(29) "87.250.224.66, 162.158.134.77"
  [223]=>
  string(29) "66.249.66.204, 162.158.78.241"
  [224]=>
  string(28) "162.55.86.61, 172.70.242.169"
  [225]=>
  string(30) "103.131.71.176, 162.158.178.87"
  [226]=>
  string(32) "114.119.159.135, 162.158.162.215"
  [227]=>
  string(27) "66.249.66.84, 172.70.174.83"
  [228]=>
  string(30) "157.55.39.161, 162.158.106.185"
  [229]=>
  string(30) "114.119.150.22, 172.68.218.135"
  [230]=>
  string(28) "185.191.171.6, 172.70.174.21"
  [231]=>
  string(30) "103.131.71.153, 162.158.178.87"
  [232]=>
  string(31) "114.119.150.22, 162.158.162.231"
  [233]=>
  string(29) "103.131.71.75, 162.158.178.87"
  [234]=>
  string(29) "87.250.224.154, 172.71.98.165"
  [235]=>
  string(31) "114.119.150.22, 162.158.163.162"
  [236]=>
  string(30) "114.119.150.226, 172.70.92.219"
  [237]=>
  string(30) "207.46.13.166, 162.158.146.203"
  [238]=>
  string(31) "104.171.150.140, 162.158.62.239"
  [239]=>
  string(30) "104.171.150.140, 172.70.230.11"
  [240]=>
  string(30) "104.171.150.140, 172.70.34.207"
  [241]=>
  string(30) "104.171.150.140, 172.70.110.71"
  [242]=>
  string(32) "104.171.150.140, 162.158.134.107"
  [243]=>
  string(31) "104.171.150.140, 172.70.110.235"
  [244]=>
  string(29) "104.143.93.27, 172.70.131.124"
  [245]=>
  string(29) "104.143.93.27, 172.70.130.181"
  [246]=>
  string(28) "104.143.93.27, 172.71.22.183"
  [247]=>
  string(29) "104.143.93.27, 172.70.131.102"
  [248]=>
  string(31) "114.119.144.36, 162.158.170.173"
  [249]=>
  string(29) "103.131.71.71, 162.158.178.87"
  [250]=>
  string(55) "2001:ee0:4cfb:3930:b9d2:92d8:5985:5de1, 162.158.178.240"
  [251]=>
  string(32) "114.119.150.215, 162.158.170.173"
  [252]=>
  string(30) "17.121.112.240, 172.70.211.122"
  [253]=>
  string(27) "185.191.171.1, 172.70.34.63"
  [254]=>
  string(52) "2001:ee0:51f7:96f0:2154:3f62:e2a6:83, 162.158.179.46"
  [255]=>
  string(29) "17.121.114.156, 172.70.214.73"
  [256]=>
  string(29) "185.191.171.7, 172.70.174.147"
  [257]=>
  string(30) "103.131.71.152, 162.158.178.87"
  [258]=>
  string(29) "173.231.60.196, 172.69.42.127"
  [259]=>
  string(31) "114.119.159.135, 172.70.142.215"
  [260]=>
  string(28) "66.249.70.206, 172.70.135.50"
  [261]=>
  string(26) "64.124.8.21, 172.69.70.195"
  [262]=>
  string(26) "162.55.86.61, 172.68.50.85"
  [263]=>
  string(30) "103.131.71.234, 162.158.178.87"
  [264]=>
  string(31) "114.119.150.215, 162.158.162.11"
  [265]=>
  string(29) "93.158.161.56, 141.101.76.129"
  [266]=>
  string(27) "93.158.161.58, 172.71.94.73"
  [267]=>
  string(29) "114.119.144.36, 172.70.142.37"
  [268]=>
  string(30) "115.79.198.116, 172.70.188.253"
  [269]=>
  string(52) "2402:800:6347:be6a:299f:e6ef:e0f:608f, 172.70.189.64"
  [270]=>
  string(29) "103.131.71.72, 162.158.178.87"
  [271]=>
  string(31) "114.119.150.209, 172.70.188.253"
  [272]=>
  string(28) "66.249.66.204, 172.70.135.50"
  [273]=>
  string(31) "103.213.122.253, 162.158.179.98"
  [274]=>
  string(27) "162.55.86.61, 172.68.50.205"
  [275]=>
  string(30) "103.131.71.144, 162.158.178.87"
  [276]=>
  string(30) "103.131.71.100, 162.158.178.87"
  [277]=>
  string(27) "66.249.66.28, 172.70.135.50"
  [278]=>
  string(30) "114.119.159.135, 172.70.142.37"
  [279]=>
  string(29) "91.191.209.194, 162.158.210.5"
  [280]=>
  string(31) "91.191.209.194, 162.158.210.185"
  [281]=>
  string(56) "2405:4803:c67f:5100:d4ed:b6bd:88b9:2846, 162.158.179.229"
  [282]=>
  string(31) "104.171.149.132, 172.70.230.159"
  [283]=>
  string(30) "185.191.171.16, 172.70.134.235"
  [284]=>
  string(28) "77.245.57.108, 172.71.102.33"
  [285]=>
  string(32) "114.119.150.209, 162.158.162.221"
  [286]=>
  string(27) "40.77.167.78, 172.70.135.50"
  [287]=>
  string(24) "77.88.5.40, 172.71.94.73"
  [288]=>
  string(29) "103.131.71.87, 162.158.178.87"
  [289]=>
  string(27) "162.55.86.61, 172.68.50.191"
  [290]=>
  string(32) "114.119.150.215, 162.158.170.221"
  [291]=>
  string(29) "103.131.71.68, 162.158.178.87"
  [292]=>
  string(30) "114.119.150.22, 172.70.189.134"
  [293]=>
  string(53) "2402:800:627d:8c90:ac03:471f:63fb:5949, 172.68.254.96"
  [294]=>
  string(25) "3.238.98.39, 172.70.135.2"
}
Code tạo nút back to top cho website WordPress

Code tạo nút back to top cho website WordPress

Bài viết sau mình sẽ hướng dẫn bạn cách code tạo nút back to top cho website WordPress. Không cần dùng plugin, giúp website bạn không phải cài nhiều plugin. Website bạn nếu không có nút back to top cho website thì sẽ mang lại trải nghiệm không tốt cho người dùng. Nút back to top cho website giúp người dùng khi kéo xuống dưới website. Chỉ cần bấm vào nút đấy nó sẽ tự động di chuyển lên đầu trang. Sau đây Chuẩn Seo Web sẽ hướng dẫn bạn cách code tạo nút back to top cho website WordPress đơn giản nhất. Bài viết này thuộc chuyên mục WordPress Development. Mời bạn theo dõi.

Code tạo nút back to top cho website WordPress

Code tạo nút back to top cho website WordPress
Code tạo nút back to top cho website WordPress

Dưới đây mình sẽ hướng dân bạn code tạo nút back to top cho website WordPress bằng cách sử dụng code html. Bạn thêm đoạn code tạo nút back to top cho website html sau vào file footer.php trong theme. Nó giúp tạo ra nút button vào các trang trong website của bạn.

<a href="javascript:void(0)" class="csw_btn_back_top" >
    <i class="fas fa-angle-up"></i>
</a>

Sau đó bạn thêm đoạn code css sau vào trong file style.css trong theme.

.csw_btn_back_top {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #af0a24;
  width: 30px;
  height: 30px;
  text-align: center;
  border-radius: 3px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  opacity: 0;
  visibility: hidden;
  z-index: 999999;
}

.csw_btn_back_top i {
  font-size: 20px;
  color: #fff;
}

.csw_btn_back_top:hover {
  cursor: pointer;
  background-color: #222;
}

.csw_btn_back_top.show {
  opacity: 1;
  visibility: visible;
}

Khi thêm đoạn code css trên vào nó sẽ giúp hiển thị nút đẹp hơn. Tuy nhiên nó sẽ chưa thể tự động hiện lên khi người dùng kéo chuột xuống dưới. Tiếp theo để nút back to top tự động hiện lên, và khi click vào nó tự kéo lên đầu trang. Bạn cần thêm đoạn code js sau:

$(document).ready(function(){
  var btn = jQuery('.csw_btn_back_top');

  jQuery(window).scroll(function() {
    if (jQuery(window).scrollTop() > 350) {
    btn.addClass('show');
  } else {
    btn.removeClass('show');
  }
});

Như vậy là bạn đã code tạo nút back to top cho website xong. Mình hy vọng sẽ giúp ích cho bạn. Nếu có thắc mắc hay câu hỏi gì bạn vui lòng để lại bình luận bên dưới. Cám ơn bạn đã theo dõi bạn viết.

Nguyễn Luân

MÌnh là Luân. Mình có 4 năm kinh nghiệm trong lập trình website và 3 năm làm về WordPress theme và plugin. Rất hy vọng có cơ hội hợp tác với mọi người. Xin cám ơn.

Có thể bạn quan tâm

Hàm _e trong wordpress

3 Tháng Mười Một, 2021 Bởi

Hàm _e trong wordpress là một hàm khi bạn phát triển theme hay plugin nên biết. Hàm này có tác dụng in ra chuỗi và chuỗi này [...]

Hàm get_post_meta trong wordpress và các ví dụ

1 Tháng Mười Một, 2021 Bởi

Hàm get_post_meta trong wordpress là hàm để lấy giá trị meta value theo meta key của một bài viết, sản phẩm, hay bất kỳ [...]

Cách thêm sidebar cho wordpress không dùng plugin

7 Tháng Mười, 2021 Bởi

Bài viết sau mình sẽ hướng dẫn bạn cách thêm sidebar cho wordpress mà không cần dùng đến plugin. Bạn chỉ cần thêm một [...]

Hàm mktime trong php

15 Tháng Chín, 2021 Bởi

Việc hiểu về các hàm thời gian trong php và hàm mktime trong php sẽ giúp bạn dễ dàng hơn khi làm việc liên quan tới thời [...]

wp_head trong wordpress có tác dụng gì

14 Tháng Chín, 2021 Bởi

wp_head trong wordpress là một hook cho phép bạn thêm các tính năng tùy chỉnh vào cặp thẻ trong website. Với hook wp_head bạn [...]

Bạn để lại bình luận tại đây

favico-1

ChuanSeoWeb.com

Minh Phượng , Nham BIền, Yên Dũng, Bắc Giang
Thời gian hoạt động:
T.2 – T.7: 07:30 am – 5:30 pm