Include php and Javascript code in page template

This topic has 4 replies, 2 voices, and was last updated 5 years, 10 months ago ago by Rose Tyler

  • Avatar: idon
    idon
    Participant
    May 23, 2018 at 10:01

    I am trying to use php and javascript code in a new page template but it does not work and some elements disappear.

    Could you tell me what is the correct way to use the code? Thank you

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 23, 2018 at 10:06

    Hello,

    Thanks for the topic.
    Please describe in details with screenshots what was done and explain the desired result.

    Regards

    Avatar: idon
    idon
    Participant
    May 23, 2018 at 11:02

    Can I include code in the page template or would I have to use an external file?

    I send my url

    https://bit.ly/2Hgbriw

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 23, 2018 at 13:53

    Hello,

    It depends on your need. If you want to include some php code, you need to edit .php file. Please read about child theme https://xstore.helpscoutdocs.com/article/32-child-theme https://codex.wordpress.org/Child_Themes To include some scripts you can create a new file with scripts and include it using the child theme. Also, Raw JS element can be used http://prntscr.com/jlldgm to include Java Script code on your page.
    Feel free to ask if you have any other questions.

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.