Call Javascript from PHP for Wordpress post.

Discussion in 'PHP' started by Daoteo, Oct 22, 2008.

  1. #1
    What I want to do is to state that if my page ID for wordpress is #ID a java script will work. I have little knowledge of PHP but that is what i want it to do...

    
    <?php if(is_single('123')) echo Javascript here 
    
    
    PHP:
    How do I do it ? Help highly appreciated.
     
    Daoteo, Oct 22, 2008 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    <?php
    if(is_single('123'))
    {
    ?>
    <script>
    execute(aaa,aaa);
    </script>
    <?php
    }
    ?>
     
    bartolay13, Oct 22, 2008 IP