Jump to content

How to use wordpress template for processwire?


goldenghost07
 Share

Recommended Posts

Processwire has no front end as such and leaves that totally up to you. Instead it hands you over a template file

on the front end, e.g. home.php - basic-page.php, etc. and a template setup in the back end (the admin).

That means you can use any html, css, js, etc. as your template markup on the front. You can make your own,

or use one from Wordpress, or use one from any other cms out there. In fact you can use any template markup

out there that you can find such as those from templatemonster, codecanyon, envato, etc. etc. etc.

In your case with a Wordpress template, just remove any back end code out of that Wordpress template

and replace it with processwire back end code.

Link to comment
Share on other sites

  • 2 weeks later...

What I did once was downloading the entire template using a web crawler software like HTTrack. That leaves you with a simple HTML copy of the otherwise PHP/WP template. And then you can use it as you wish with ProcessWire.

That can be quite a nightmare... You'd have to basically re-build the template to account for headers and footers. Otherwise, they're repeated everywhere. Messy stuff.

Anyways, I've never done it before as I've never really made good use of WordPress. I guess that there are complicated templates that use WP-specific features. One would have to find a way of moulding those features into PW. Then again, all I know is that WP themes, especially the big ones, are very very messy. You'd be better off building a new one.

Link to comment
Share on other sites

It would be very difficult, PW has no concept of template, its data-driven its up to render the data to the HTML, however if you know Wordpress function simply take out those calls but my advice is to save the whole page as HTML, I tried using a WP template to PW but sadly WP is poorly coded some template parts can be in a function and would take years finding. 

Link to comment
Share on other sites

it's actually really easy to use a wordpress theme for PW; but you do have to have access to the output; so if there is a demo, then you can see the generated markup; you would just need to point the assets to the correct place and it should all work; I've used some pretty complex WP themes so far with PW.. main thing for me was coming up with a good way to generate the right body classes, so i have a function for that..

  • Like 3
Link to comment
Share on other sites

If the original HTML template (before it was converted to WP) is a good one, you should get very good HTML code, and it should be as easy as using any other HTML template. I've done it and the results were great, no repeated code, no messy stuff, and really quick, just a couple of hours at most.

Link to comment
Share on other sites

post-756-0-32439000-1427875957_thumb.png

You may want to take a look at Philipp Reiner's "First Steps" video that goes through the process of working with a HTML template for use with PW.  The main part for the HTML template stuff starts around the 14:44 period.  I would suggest you look at the entire video and other PW related video content on the ProcessWire website.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...