• Hi all

    I have a plugin with multiple php files. I want to load some of them only when specific template files are loaded. I don’t want to load everything.

    Currently, I’m doing it with

    add_action( ‘wp’, ‘load_files’ )

    , but it means actions defined in the additional php files are not being done.

    Any ideas?

  • The topic ‘load/require specific php files for specific templates or post types’ is closed to new replies.