Support » Fixing WordPress » Use the php contents of a page as a library

  • Resolved Priory900

    (@priory900)


    I am a new WordPress user, but am reasonably familiar with php.
    I have created a page containing a family of useful functions that can be used from other pages.
    1. Is this a reasonable thing to do?
    2. How do I include the functions in this page from other pages?
    3. What documentation should I be looking at?

    David Butland

Viewing 2 replies - 1 through 2 (of 2 total)
  • Those functions probably need to go in the functions.php file of your theme. Then they can be called from other php files in the theme.

    You should create a Child theme to make your changes. If you do not, all of your changes will be lost if you update your theme.

    Thanks. I wouldn’t have thought of looking there.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use the php contents of a page as a library’ is closed to new replies.