• I try to add some javascrit snippets to the HEAD section of my site, but can’t get an access to the code of the template.
    I don’t have the EDITOR feature under appearance menu.
    How can and should I get access to the HTML code of my template?
    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi.,

    Use this method

    function myscript_func( $atts ) {?>
    <script type="text/javascript">
    // YOUR CODE HERE
    </script>
    <?php }
    add_shortcode( 'myscript', 'myscript_func' );
    Thread Starter shakedba

    (@shakedba)

    Thanks for the answer, but the actual problem is that I don’t know how and where to write this function and then insert it to the page code.
    put it in other words – HOW CAN I GET EDITOR FEATURE BACK?

    Put this code to function.php on your theme file

    and use [myscript] shortcode to your text editor

    Sorry for the delay

    Thread Starter shakedba

    (@shakedba)

    but how can I access to the code of the theme?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add a JS snippet to the section’ is closed to new replies.