Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #248940

    Some HTML code we are adding to a page requires us to import a javascript file in the body of the page right above the HTML code. If I add the javascript import html, save the page, and then go back to the page to edit it, the javascript import code is being removed. I understand this is a wordpress specific problem.

    So I tried to avoid this by adding a custom shortcode to “output” the javascript import html instead but the theme doesn’t appear to process short codes either. Even if I used the custom fields and try to add something like:

    [cf]js-slider[/cf]

    When you view the page you’ll see the same thing rather than the rendered version of the short code.

    • This topic was modified 10 years, 7 months ago by cirrus05. Reason: clarification
    #249072

    Hi,

    Where is this “cf” shortcode coming from? have you registered it in the functions.php file?

    Try using this plugin: https://wordpress.org/plugins/insert-html-snippet/

    Cheers!
    Josue

    #249336

    Awesome, that worked, thanks :)

    #249345

    You are welcome, glad we could help :)

    Regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘trouble with adding slider javascript’ is closed to new replies.