• Hello ??
    Please can you help me?

    I need to include plugin in my WordPress theme without plugin activation.
    I have these lines:

    include_once dirname( __FILE__ ) . '/math/class-constrained-array-rounding.php';
    include( plugin_dir_path( __FILE__ ) . 'class.jetpack-user-agent.php');
    include( plugin_dir_path( __FILE__ ) . 'functions.gallery.php');
    include( plugin_dir_path( __FILE__ ) . 'jetpack-carousel.php');
    
    wp_enqueue_script( 'tiled-gallery', plugins_url( 'tiled-gallery/tiled-gallery.js', __FILE__ ), array( 'jquery' ) );
    wp_enqueue_style( 'tiled-gallery', plugins_url( 'tiled-gallery/tiled-gallery.css', __FILE__ ), array(), '2012-09-21' );

    I think I need to use function get_template_directory_uri() . instead of plugin_dir_path to include these files, but I’m confused.

    I’m new in WordPress, please can somebody help me with this? ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    You do actually need to use get_template_directory_uri but I would strongly suggest not bundling Jetpack with your theme. This is because at best, every time Jetpack updates, you’re going to need to update your theme.

    Thread Starter meslavina

    (@aineko)

    Thank you, Amanda!

    I’ll disable plugin update.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to include plugin without activation?’ is closed to new replies.