1

I want to separate the HTML and PHP code so that the HTML guys can easily work on their files without disturbing the PHP code, but couldn't find any proper solution or Start point to begin. Please help me out.

My assumptions: I will create a desired array and pass it to the view of HTML where I will loop through the HTML elements BUT HOW TO DO IT.

3
  • 1
    Please edit your question to clarify how it is specific to WordPress rather than merely a PHP/HTML question in the context of WordPress. Also, please edit your question to describe what you have attempted thus far. Apr 16, 2014 at 12:41
  • 1
    Try searching for WordPress and MVC in Google (or even here). Also, take a look at Timber (jarednova.github.io/timber) as an example of how the view can be split away from the controller/model.
    – anu
    Apr 16, 2014 at 12:44
  • 2
    Are you asking how to create MVC in WordPress? Or how to use a templating system in a theme? There should already be minimal code in your html templates, and I would be very worried if developers who didn't know basic PHP were playing with the html in a theme or plugin
    – Tom J Nowell
    Apr 16, 2014 at 13:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.