• Resolved mak1wp

    (@mak1wp)


    Hi,

    I’m trying to migrate a very simple plugin into a very simple theme.

    The plugin specifies some wp_enqueue scripts and CSS, but I have no clue how to change the URL from the plugin directory, to the active theme directory.

    Here is the example of the code used to load the plugin URL…

    function ScriptsAndCSS() {
    
    wp_enqueue_style($this->plugin->name.'-bootstrap', $this->plugin->url.'css/bootstrap.min.css');
        }

    This link to the plugin/ directory. Please can anyone advise how to tell this bit of code to point to /themes/activetheme/ directory?

    Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • function ScriptsAndCSS() {
        wp_enqueue_style($this->plugin->name.'-bootstrap',
        get_template_directory_uri().'/css/bootstrap.min.css');
    }
    Thread Starter mak1wp

    (@mak1wp)

    Hey thanks so much x500!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin / Theme file path’ is closed to new replies.