Wednesday, October 19, 2022
HomeWordPress Developmentplugin growth - Discover Any Theme's web page.php File

plugin growth – Discover Any Theme’s web page.php File


I am creating a plugin that should create a web page template that makes use of any theme’s ‘web page.php’ file. The intent is to learn the supply code of that theme’s web page.php, modify it so as to add further features, and retailer the modified template file within the plugins folder. The brand new template will then be made out there on a web page’s ‘template’ dropdown (utilizing the ‘template_include’ filter as described right here).

The brand new template wants so as to add further plugin scripts (‘contains’), and may have a shortcode that may insert a type on the shortcode’s location.

Since all themes have their very own model of a ‘web page.php’ file, I would like to make use of the construction of the theme’s web page.php file (with all it is CSS and no matter content material), in order that utilizing the brand new template on a brand new web page will lead to a web page that matches the theme’s ‘look’.

Is there a operate that may work out the web page.php template file?

Or is there a means {that a} shortcode can add ‘contains’ to a web page?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments