Site icon Hip-Hop Website Design and Development

Creating web page & put up templates with out template file

Often if you wish to customise a put up (generic: ie all) kind in WordPress you’ll create a customized web page template for it ie, following the template hierarchy, a web page will probably be customised based mostly on it is title and the place it falls in that hierarchy. The additional to the left within the following template graphic, the primary it should get chosen. If I’ve ever wanted to create a customized web page format, that is what I’ve achieved.

With pages (and never posts) you possibly can choose a “default” template that applies to the web page. This often pertains to whether or not the web page could have a sidebar or not, being that the default could have a sidebar and there’ll often be another choice for “full width”.

I’ve just lately used a plugin that has a pleasant characteristic of constructing every web page distinctive within the entrance finish editor. One thing that I assumed would solely be potential by way of a customized web page/put up template file for that content material.

That’s to say, that with out making a customized put up kind, or template file, the plugin utilises some hook whereby the web page format is customized altered for that put up solely.

I wish to do one thing related the place I can dictate that almost all of my pages comply with the usual format, however for some pages which are in a roundabout way or different recognized I would like that format modified and I might desire that to be by means of hook or filter, and achieved not by way of further pages.

The modifications are largely CSS based mostly.

Ideally, I might prefer to have a dropdown just like the “default template” metabox that permits me to select which one to make use of and be utilized to that web page.

For the sake of argument and instance, the default can be unchanged, and one other alternative would change the max-width and background-color of the .col-ful class in addition to an additional widget space between the content material and the footer.

I do know I may simply create a customized web page kind and use it for these pages, however I wish to nonetheless be capable to utilise the customized naming precept of the hierarchy to permit for additional customisation of the web page if needed. ie, I would like it to behave on the surface of the content material just like the default template dropdown, however nonetheless permit customised content material codecs that the named web page varieties permit. PLUS I would like the template to be out there throughout a number of put up varieties, not simply pages.

edit: I like the concept proposed by LSW-Mo within the feedback, and initially I assumed it could work, nonetheless, the property I want to change is larger up within the .col-ful classed div (highlighted within the picture). I wish to override the max-width attribute which is simply set manner too low for my liking (seen larger in the best pane).

If anybody may recommend learn how to modify that in a fashion as per described by LSW-Mo, that will be appreciated.