Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

315
Vistas
Include external files in functions.php WordPress

In my WordPress I have a functions.php file containing 1500 lines of code.

Most of this code comes from a program I wrote that connects to an API and sends data from WordPress to it. I am not a WordPress developer, so I do not know if this is possible. Can you make a different file to keep functions.php clean and then include the external file inside the functions.php?

about 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

If you are working with a Child Theme but the path of your include route is not found:

Try the following:

include_once( get_stylesheet_directory() .'/xxxx/anyfilename.php');

Check get_stylesheet_directory() to see your child theme path.

about 4 years ago · Santiago Trujillo Denunciar

0

Yes you can include the external file in functions.php

require_once( get_template_directory() . 'anyfilename.php' );

about 4 years ago · Santiago Trujillo Denunciar

0

You can include external files in functions.php by using either

require_once();

or else you can use

include_once();

The difference between these two is that in the event that the file is not found require will give out a fatal error and then stop executing the rest of the file where as include will only issue a warning but will continue the execution of the file.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda