How to retain HTML5 Attributes on Markup

It is enough to add unfiltered_html capability to Editor role. Add the following code into your current theme’s functions.php: function wpse_change_capability() { $role = get_role( ‘editor’ ); if ( ! $role->has_cap( ‘unfiltered_html’ ) ) $role->add_cap( ‘unfiltered_html’ ); } add_action( ‘init’, ‘wpse_change_capability’, 10 ); Login as the user with Editor role. Test it by editing any … Read more

how to check if an element in an html file exists in another html file? [closed]

If I understand you correctly, and you want to find an HTML element inside another page, you need to use some HTML parser. Take a look at https://www.php.net/manual/en/domdocument.loadhtmlfile.php or https://github.com/paquettg/php-html-parser. I believe there are more tools that can help you with this. On page B you load page A as a remote document by URL, … Read more

Equal height sections in custom Headway Theme

We can do this without touching theme files either by using a child theme or Writing a Custom Plugin, To include only css I’d use plugin rather than a child theme. Example – <?php /* Plugin Name: My Styles Description: My Custom Styles for THEME-NAME */ //Create a `my-style.css` in plugin folder add_action( ‘wp_enqueue_scripts’, ‘wpse64258_custom_styles’ … Read more

Plugins not showing up for custom template

Always Put wp_head() in header and wp_footer() in footer. the plugin uses this hook Header.php: <?php … /* Always have wp_head() just before the closing </head> * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to <head> such * as styles, scripts, and meta … Read more