• Resolved Lou Sparx

    (@roulettered)


    Hey,

    I’m a designer by trade and have a few themes about to be released (free). My themes work so much better with a few plugins and was wondering how to intergrate plugins into my themes so the end user doesn’t have to download/install?

    Obviously with the plugin developers permission. I noticed a meta tag plugin was a single php file so I tried to call it from my header ie along the lines of.. [template include PLUGIN.php] etc. but my theme returned a blank.

    I understand some plugins change core files but I’m talking about simple ones that just add a certain color and or meta tag for example.

    Any help would be much appreciated.

    Lou

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    If the plugin came with some sort of an include code, you can use it to place it where ever you want it to appear within your theme. Just make sure to use if( function_exists() to prevent the theme from breaking if the user chooses not to use the specific plugin. For example, Add to Any’s Share Button include code:

    <?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>

    See this for more info:

    http://codex.wordpress.org/Managing_Plugins#Hiding_Plugins_When_Deactivated

    Thread Starter Lou Sparx

    (@roulettered)

    Thanks but that would still require the user to install X-plugin.

    It’s a tough subject but I’m sure I’ve seen themes come with pre-installed plugins.

    Moderator James Huff

    (@macmanx)

    Oh, you mean you actually want the plugin functions to be a part of theme?

    In that case, you’d have to mimic the plugins’ functions in a functions.php file within the theme. See this for more info:

    http://codex.wordpress.org/Theme_Development#Functions_File

    Thread Starter Lou Sparx

    (@roulettered)

    Cheers James you said what I tried to explain lol. The php file that came with the plugin is quite basic so I mite try a copy/paste the code direct into my functions.php.

    Probably wont work but I’m on the right track, hopefully.

    Thanks

    Moderator James Huff

    (@macmanx)

    You’re welcome!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Themes With Plugins INTERGRATED..’ is closed to new replies.