WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try load external script as plugin , the idea it´s use one easy plugin and call script and load this script into admin but i have problems with some configuration files and css files , in the case of css files for example load and the path it´s right but no add the styles to the forms , by other side i have one file of configuration for insert some strings and take values as the type as this :


The problem it´s no take the values of this string or other

My functions this :

if (is_admin())
  function load_libraries()
    locate_template(array('core/funciones/funciones_config.php'), true,false);
  function plugin_admin_options_page() {
    add_action('admin_menu', 'load_libraries');
    echo $ruta_path;
    <div class="wrap">
      <h2>Plugin Options Admin Page</h2>
      locate_template(array('core/modulos/mod_dominios/index_adm_menu.php'), true,true);
  //add_options_page("Dominios", "sistema de dominios", "administrator", "dominios_options", "plugin_admin_options_page");
  function searcher_domains() 
    //add_options_page('Hello World', 'Hello World', 'administrator','hello-world', 'hello_world_html_page');
    add_options_page('Dominios', 'Dominios', 'administrator', 'adm_dominios', 'plugin_admin_options_page');
  add_action('admin_menu', 'searcher_domains');

The idea it´s load external scripts into admin of WordPress for manage the same other plugins but the real problem it´s with the paths and include this kind of files and also css or js from this little plugin.

share|improve this question

I am having a hard time understanding exactly what the problem is but two things come to mind.

  1. locate_template searches theme directories. It is not a general purpose file loader. I don't know if that is relevant to your case. There is not enough detail in the question to work that out. Given that you have not mentioned themes at all and are only talking about "external scripts" and plugins, I suspect that this is the problem.
  2. You may be having scope issues with the includes.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.