• Resolved degamer12

    (@degamer12)


    Hi all,

    I have a little problem. I am working on a default template so that I have a nice base template on witch I can build my sites. The only problem now is that I have to reinstall all my plugins everytime I want to use my base template. Is there a way to put the plugin in my template directory and still get it installerd ? I am talking about the SEO plugin from Yoast.

    Thanks in advance,
    Bob

Viewing 9 replies - 1 through 9 (of 9 total)
  • I don’t understand your question.

    Changing Themes doesn’t impact installed/active Plugins.

    Thread Starter degamer12

    (@degamer12)

    I want that a plugin gets integrated with my theme. That way, when you install my theme, you dont need to install plugins seperadly but that automaticly happends when you install my theme. So it is kinda like the plugins are embedded in my theme.

    That’s generally a bad idea, because it conflates the presentation and management/creation of content. Themes handle the former, and the latter is best left to Plugins.

    For example, Yoast SEO handles things that should remain constant, independent of which Theme is currently in use.

    A better approach would be to develop your Theme such that it accommodates and/or supports/implements a particular Plugin.

    A common example might be Yoast Breadcrumbs or WP-PageNavi. Both of these Plugins provide template tags to output their content; to integrate them into your Theme, simply call the template tag, wrapped in a function_exists() conditional. e.g.:

    if ( function_exists( 'yoast_breadcrumbs' ) {
         yoast_breadcrumbs();
    } else {
         // some default content goes here
    }

    Thread Starter degamer12

    (@degamer12)

    Ok, but I still want it. Could you help with it ?

    Can I recommend an alternative: Plugin Central

    Thread Starter degamer12

    (@degamer12)

    I will look into it. Thanks for the advice.

    I know it sounds like a time saver for you if you use the same basic theme a lot, but Chip seems on the right idea. There is a good chance the plugins will still need to be customized by every user, and if you did somehow have them come along with the theme taking them out could cause big code problems.

    @chip, that plugin central is bad a$$, just found it. Thanks!

    @chip, that plugin central is bad a$$, just found it. Thanks!

    Yeah, Vladomir writes some pretty awesome code!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Embed a plugin in template’ is closed to new replies.