SOLVED Plugin to add META tag to header - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: SOLVED Plugin to add META tag to header (/showthread.php?tid=16122) |
Plugin to add META tag to header - David Singleton - 2021-02-19 It is recommended to add the following META tag to the HTML header, so that the content is better displayed on a mobile device. Code: <meta name="viewport" content="width=device-width, initial-scale=1.0"> The question is: how to do this in Get-Simple? I have found a way using a simple plugin, as follows: Code: <?php The plugin should be installed in the 'plugins' directory. The plugin registers an action 'theme-header', which is then called automatically from the Get-Simple framework. The result is the required, inserted META tag. RE: Plugin to add META tag to header - datiswous - 2021-02-22 Easier is just putting that line in the website theme. But kudos that you made a plugin for it. I guess it's also a nice example plugin, for people that like to learn making plugins. Btw. if theme already has this line in it, it would be doubled, right? So then there should be a check if the line exist or not (if statement?). |