Allow HTML in Settings API input field

When you register a setting, you pass the santize callback for that setting: register_setting( ‘my_setting_group’, ‘my_setting_name’, // The next parameter is the validation callback ‘my_setting_validation’ ); Then, in the validation callback you can allow whatever you want. For example, in the next code snippet, users with unfiltered_html capability will be allowed to insert raw HTML … Read more

Using custom HTML tags to WordPress [closed]

[*] You can expand list of KSES allowed tags (and their attributes): add_filter(‘wp_kses_allowed_html’, ‘wpse_283385_blocktip_tag’); function wpse_283385_blocktip_tag($allowed_tags) { $allowed_tags[‘blocktip’] = array( ‘name’ => true, ‘id’ => true, ‘class’ => true, ‘style’ => true ); return $allowed_tags; } add_filter(‘tiny_mce_before_init’, ‘wpse_283385_blocktip_tag_tinymce’); function wpse_283385_blocktip_tag_tinymce($init) { $tags=”blocktip[*]”; if ( isset( $init[‘extended_valid_elements’] ) ) { $init[‘extended_valid_elements’].= ‘,’.$tags; } else { $init[‘extended_valid_elements’] … Read more

Unfamiliar HTML Properties in Avada and Divi Themes [closed]

These are called data attributes, which are custom attributes in the format of data-* used to attach more info to the html elements. This link here gives good examples on how to use them: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes Example: <div id=’el’ data-my-attr=”attr_value”></div> JavaScript: Most of the time, these info are used by JavaScript to fetch data and process … Read more

Inline style HTML attribute is being stripped from all elements of a post

This is because what you’re trying to do trips a security feature, post content is passed through wp_kses_post to strip out dangerous tags Administrators however, have the unfiltered_html capability, which allows them to put arbitrary dangerous HTML in content and titles. This is why you’re able to insert the tags via the editor. This still … Read more

inside in editor

This is entirely possible, as I just tested it in WordPress. Create your unordered list Add four items: “First list,” “Second list,” “Sub Second List,” “Third List” Place the cursor on “Sub Second List” and click Indent (you will need to expand the kitchen sink to access the indent button With the cursor still on … Read more

Most valid way for the URL html structure

There are different ways to achieve this. Google tries to automatically extract the publish date of an article you wrote. The most common and easiest way for Google is to use rich snippets: http://schema.org/Article See “datePublished” – property for this. After you implemented these little HTML-snippets you can test your markup using the Rich Snippet … Read more

Insert HTML Page in WordPress Page

You can’t because it’s a non-secure page http but you’re loading into an https page. It’s called Mixed Content. Adjust your protocol to // and hope it renders over https. <iframe src=”https://creditsmart.in/wp-content/themes/voice/emicalc.html” name=”frame1″ scrolling=”auto” frameborder=”no” align=”center” height = “300px” width = “100%”> </iframe> ( iframe code modified from @Ittikorn’s answer ) If the file is … Read more