1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need a plugin that can add code in wordpress

Discussion in 'BlackHat Lounge' started by soldpitch, Jul 7, 2017.

  1. soldpitch

    soldpitch Newbie

    Joined:
    May 19, 2017
    Messages:
    44
    Likes Received:
    0
    i need a plugins that put a code in my theme for example from 8 am to 11 am to be pause then to be active usually this code i add in header.php but i need with time to active/pause
     
  2. Gogol

    Gogol Jr. VIP Jr. VIP

    Joined:
    Sep 10, 2010
    Messages:
    3,411
    Likes Received:
    3,057
    Gender:
    Male
    what are you talking about?:confused:
    you mean you don't want to show some of your code in your header.php for a particular time? You want to kill your server from 8 to 11?
     
  3. blogzandstuff

    blogzandstuff Elite Member

    Joined:
    Jan 1, 2015
    Messages:
    5,216
    Likes Received:
    2,412
    Occupation:
    blog creator
    Location:
    UK
    Not only is this confusing, it's in the wrong section, it should be in blogging
     
  4. RightFootFanatic

    RightFootFanatic Regular Member

    Joined:
    May 31, 2015
    Messages:
    321
    Likes Received:
    180
    Occupation:
    DevOps
    Location:
    Whimsyshire
    • Thanks Thanks x 2
  5. soldpitch

    soldpitch Newbie

    Joined:
    May 19, 2017
    Messages:
    44
    Likes Received:
    0
    i have like jack and i dont want full time to be in my website but i want to add time when will be active and pause
     
  6. Gogol

    Gogol Jr. VIP Jr. VIP

    Joined:
    Sep 10, 2010
    Messages:
    3,411
    Likes Received:
    3,057
    Gender:
    Male
    in your header.php..

    Code:
    <?php
    if( (date('H') >= 8) && (date('H') < 12) ){
       // between 8AM and 11AM (for 1PM it would be 13)
    ?>
    <script> // like jacking script here </script>
    <?php
    }
    ?>
    
    Edit: be sure to check your server timezone for fine tuning....
     
    • Thanks Thanks x 1