-
AuthorPosts
-
March 2nd, 2014 at 01:37 #24168pete
I would like to add google calendar to my front (presentation) page. I hoped I could do this by inserting the code into the “extra text” box but it is stripped out.
March 4th, 2014 at 23:02 #24202Cori WarnerSimilar problem. I would like to add a Google ad under the slider, but the “extra text” box won’t accept code, which is kinda dumb. Method for adding Google anything to presentation page much appreciated.
March 5th, 2014 at 23:38 #24223peteI did find a link somewhere that it is a feature of wordpress that requires HTML is stripped out from text boxes on the presentation page.
Cori I followed the instructions below, got confused and nearly delted the site – for once I backed up!
http://www.cryoutcreations.eu/parabola/parabola-faqs
C20. I want to add my own HTML to the presentation page / Why is my custom HTML stripped?
The theme uses WordPress’ built-in sanitation function to strip potentially harmful HTML data. Each field in the settings uses the wp_kses_data() function to sanitize user inputed content. (WordPress Codex has a good explanation concerning sanitation usage)This is required for the theme to achieve approval by the WordPress theme reviewing team.
For a list of (default) accepted HTML tags and attributes, see the header of WordPress’ kses.php file.
This default behaviour can be overridden using plugins, theme or WordPress modding.
As far as modding the theme is concerned, you can edit the theme/admin/sanitize.php file and inside the [..]_options_validate() function you can remove the wp_kses_data() processing on every field you wish to remove the sanitation from (the field names are pretty much self explanatory).
-
AuthorPosts
The topic ‘Adding HTML to Presentation page’ is closed to new replies.