Converting WordPress Themes
This page gives an overlook as to how to convert WordPress themes into b2evolution 2.2.1+ skins.
Notes: his guide is several years old now and:
- does not apply to b2evolution v6 skins
- may not apply to recent WordPress themes.
While WordPress themes used to be very different, since WP 1.5, WP themes are now very similar to evoSkins. This makes porting relatively easy. Converting from the one to the other will mainly be a matter of renaming files and tags…
Note that the best way to get started would probably be to compare the default WordPress ("kubrik") theme with the "evopress" b2evolution skin. Those are the same design implemented for each platform.
Now, if you want to start with a theme of your own, let’s assume the theme/skin is named ‘’mydesign'’…
Copy the folder
Renaming the files
Reference pages: WordPress vs. b2evolution
/b2evolution/skins/mydesign/ , rename the following files:
Replacing the skin tags
Let’s start by editing the basic files…
Add these lines at the beginning of the CSS file:
The WP file should start with:
Replace this with:
The WP file should end with:
Replace this with:
There is a main loop starting with:
Replace that with:
Remove everything up to and including:
(in b2evolution, this is all taken care of by _html_header.inc.php)
Remove the end of the file, especially:
(in b2evolution, this is all taken care of by _html_footer.inc.php)
Installing the skin
Go to the admin panel, Global Settings > Skins install > Install new and install the mydesign skin.
Then go to your test blog, Blog Settings > Skin and select the mydesign skin.
The top of the skin should display. Of course, there will be errors because you still need to replace quite a few skin tags, but by now you should have an idea about how to go about it.
WordPress themes tend to reference the $siteurl variable. While the WP compatibility layer will set this variable, using global variables to construct urls in skins is considered dirty practice. Try to use the appropriate template tags instead.
Note: if it looks like $siteurl not defined, try adding this on top of your template:
Some advanced features like email subscription, profile editing, messaging forms require the skin to be able to include at least the standard sub templates. You may find that you need to include something like this:
Created by • Last edit by on Apr 02, 2017
Feedback awaiting moderation
This post has 3 feedbacks awaiting moderation...
Form is loading...