WordPress beautification: pop-up advertising code sharing

 Watson Blog September 26, 2018 00:15:48 WordPress comment five hundred and fifty Reading mode

WordPress beautification: pop-up advertising code sharing

 WordPress beautification: pop-up advertising code sharing

  1. The following code is added to the front of the topic footer. php</body>
  2. Replace the advertising image URL with your image link and change it to your link
  3. <div id= "tmall_1111"  style= "display:none" >
  4.     <div style= "width: 100%; height: 100%; z-index: 1000; top: 0px; left: 0px; position: fixed; opacity: 0.8; transition: all 0.3s; background: radial-gradient(rgba(0, 0, 0, 0.498039), rgba(0, 0, 0, 0.8));" ></div>
  5.     <div style= "position: fixed;width: 340px;height: 443px;top: 50%;left: 50%;margin-top: -221.5px;margin-left: -170px;z-index: 1001;" >
  6.         <a target= "_blank"  href= " http://wosn.net " ><img style= "max-height: 100%;max-width: 100%;"
  7.                                                                     src= " http://wosn.net/logo.png " ></a><span
  8.                 style= "position: absolute;top:-10px;right:-10px;color:#eee;font-size: 30px;cursor: pointer;"
  9.                  class = "tmall_1111_close" ><img
  10.                     src= " http://wosn.net/logo.png " ></span></div>
  11. </div>
  12. <div  class = "tmall_1111_left"
  13.      style= "position: fixed; right:4%;bottom: 150px; width: 100px; height: 100px; text-align: center; cursor: pointer; z-index: 99;" >
  14.     <img style= "max-width:100%;max-height:100%;"  src= " http://wosn.net/logo.png " >
  15. </div>
  16. <script type= "text/javascript" >
  17.      function  wp_get_aCookie(a) {
  18.          var  b, c, d = document.cookie, e = a +  "=" ;
  19.          if  (d) {
  20.              if  (c = d.indexOf( "; "  + e), -1 === c) {
  21.                  if  (c = d.indexOf(e), 0 !==  c)  return   null
  22.             }  else  c += 2;
  23.              return  b = d.indexOf( ";" , c), -1 === b && (b = d.length), decodeURIComponent(d.substring(c + e.length, b))
  24.         }
  25.     }
  26.      function  wp_set_aCookie(a, b, c, d, e, f) {
  27.          if  ( "number"  ==  typeof  c) {
  28.              var  g = c, h = c =  new  Date;
  29.             h.setTime(+h + 864e5 * g), c = h.toGMTString()
  30.         }
  31.         document.cookie = a +  "="  + encodeURIComponent(b) + (c ?  "; expires="  + c :  "" ) + (d ?  "; path="  + d :  " path=/" ) + (e ?  "; domain="  + e :  "" ) + (f ?  "; secure"  :  "" )
  32.     }
  33.      function  wp_clear_aCookie(a, b, c, d) {
  34.         wp_set_aCookie(a,  "" , -1, b, c, d)
  35.     }
  36.     jQuery( function  (a) {
  37.         1 !=  wp_get_aCookie( "tmall_1111" ) && a( "#tmall_1111" ).show(), a( ".tmall_1111_close" ).click( function  () {
  38.             a( "#tmall_1111" ).hide(), wp_set_aCookie( "tmall_1111" "1" , 1 / 24)
  39.         }), a( ".tmall_1111_left" ).click( function  () {
  40.             a( "#tmall_1111" ).show()
  41.         })
  42.     });
  43. </script>

 

 

 

 Watson Blog
  • This article is written by Published on September 26, 2018 00:15:48
  • This article is collected and sorted by the website of Mutual Benefit, and the email address for problem feedback is: wosnnet@foxmail.com , please keep the link of this article for reprinting: https://wosn.net/1425.html

Comment