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.

  • 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. – Chip Bennett Apr 16 '14 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 '14 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 '14 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.