Articles of mvc

Why load JS through the CMS framework?

This question already has an answer here: What are the benefits of using wp_enqueue_script? 2 answers

Create page with custom php script and fetched data

I created WP page and I need to show a table with some information. This information is hold in a database (hosted on the same server). To be more detailed, I’ll try to split my question. I’m new to wordpress and don’t estimate it potential (concept) yet. 1) If I need to show my own […]

How to separate HTML and WordPress files

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 […]

using OOP approach to create plugin but stuck at making hyperlinks to work

I am new to wordpress development so please be patient if my question sounds simple or ridiculous, since I have been doing object oriented programming in PHP so i wanted to use the OOP approach in wordpress plugin development as well and came across Boilerplate. I have gone through the code in detail but I […]

Adding the hook 'vc_before_init' inside a object

I’m working on my first OOP (MVC) based plugin. Everything works perfect, enqueue front/back-end styles, admin menu pages, shortcodes creation, etc… I load my main plugin class using the init hook. From the controller I instantiate the class Custom_VC_Elements (with constructor active). class Custom_VC_Elements { public function __construct() { // Armon Product link shortcode add_shortcode( […]

How do I create plugin or theme using MVC pattern?

I am creating theme for property listing and wanted to create a add-on plugin for admin and front end customization using MVC pattern.Does anyone have any solution for same?

Event-Driven Pattern vs MVC?

In general terms what is it that the MVC framework differs from Event Driven Pattern? Is it even comparable? eg.: Codeigniter vs WordPress I mean while Codeigniter uses MVC it “watches” the Model/Controllel/View, WordPress watches events that happens on the website like Initializing(action – init hook), Admin bar initialization(action – admin init), loading the header […]

is it recommended to use an MVC framework in wordpress?

Just started learning wordpress… will start developping soon… is it recommended to start with an MVC framework for wordpress? tbh it’s hard to follow/understand plugins as each developer use his own style (most of time it’s like spaghetti coding)… will a MVC framework make a plugin more maintenable.. are there limits/constraints of using the MVC […]

Is wordpress written in MVC pattern?

Is WordPress written in MVC architect? How to understand a CMS is a MVC? A CMS that written in MVC must have directories with named “Model”, “Controller”, “View”? Sorry for my beginner question .

Adding items to page template dropdown on Page Edit Screen

I am developing a WP theme with MVC approach. It only have index.php, functions.php and styles.css on the parent directory. So, I do not want to place page templates on it rather then I want to programmatically provide them from View classes while functionality from edit screen stays the same. Users need to have page […]