Hi there, can I ask what you are trying to do by including Gutenberg in your theme? I ask as it doesn’t need to be included and should work just with any theme. Are you trying to do something more than just use it with your theme?
Chrisbup,
You don’t need to include the plugin in your theme. Undo the changes you have made and install the plugin like this:
Dashboard > Plugins > Add New > Upload Plugin > Browse > Open > Activate
You will then see a ‘Gutenburg’ link in your dashboard menu from which you can create a new post.
Thread Starter
Chris
(@chrisbup)
Yeah, I’ve been told that for custom themes, it’s good practice to include plugins in the lib directory so that theme is self-contained, with any dependent plugins specified. For example, we also have this line in libraries.php: require_once('lib/acf.php'); and corresponding acf directory and acf.php file there as well.
I already have Gutenberg installed as described above. This is just the company’s way of doing it and I’m trying to understand this use of libraries.php myself. We’re using the Sage WordPress starter theme.
-
This reply was modified 8 years, 6 months ago by
Chris.
Chris,
That’s not a good way to do things. There is no need to include plugins in the lib directory for any theme.
About the only time you ‘might’ need to do this is if a plugin is necessary for a theme to function. But even then it’s just not necessary.
However, this is going a bit off topic. If you now have Gutenburg installed you can have a play and see if it works for you (it didn’t impress me much).