How to make WordPress and TinyMCE accept tags wrapping block-level elements as allowed in HTML5?

[*] Starting with version 5 the HTML standard allows <a> tags wrap block-level elements. On a specific page I need to wrap a heading and an image with an <a> tag: Some intro text. <div> <a href=”http://somewhere/”> <h4>Some heading</h4> <img src=”http://somewhere/some-img.jpg” alt=”Some image” /> </a> </div> While I can enter this in the text editor … Read more

How to Remove novalidate attribute from comment form

I’m using html5 support for input formats and custom comment form fields with this code: <?php $commenter = wp_get_current_commenter(); $args = wp_parse_args( $args ); if ( ! isset( $args[‘format’] ) ) $args[‘format’] = current_theme_supports( ‘html5’, ‘comment-form’ ) ? ‘html5’ : ‘xhtml’; $req = get_option( ‘require_name_email’ ); $aria_req = ( $req ? ” aria-required=’true'” : ” … Read more

Comment form problem with comment_author_url and HTML5 input placeholders

I’m using HTML5 on two sites running two different versions of WordPress. They both exhibit the same behaviour and I would like some help with fixing this please. <label for=”url”>Website</label> <input type=”url” name=”url” id=”url” value=”<?php echo esc_attr($comment_author_url); ?>” placeholder=”Enter Website Address (optional)” pattern=”https?://.+”> In testing, we have identified a problem with comment_author_url that occurs when … Read more

Get menu links only

I’m creating a template in HTML5. On navigatiom menu i need to implement something like this <nav> <a href=”https://wordpress.stackexchange.com/questions/33175/url1″>url1</a> <a href=”https://wordpress.stackexchange.com/questions/33175/url1″>url2</a> <a href=”https://wordpress.stackexchange.com/questions/33175/url1″>url3</a> <a href=”https://wordpress.stackexchange.com/questions/33175/url1″>url4</a> … <a href=”urln”>urln</a> </nav> If i use ‘wp_nav_menu’, it prints <div><ul><li><a> when i need just <a> There is a way to get that? Thanks! 2 Answers 2 Use a custom … Read more

how to change WordPress menu markup/classes

I’m building my first website on WordPress, and i wanted to ask is someone know how to change markup in WordPress menu. Basically I want the markup of my WordPress navigation to match what I’ve done in my static templates. <div class=”topNav”> <ul> <li><a href=”#”>About</a></li> <li><a href=”#”>Mes siūlome</a></li> <li class=”dropdown”> <a class=”dropbtn”>if Has subMenu</a> <div … Read more

How do I enable HTML5 prefetching on this page?

Site example: http://www.ianstuart-bride.com I currently have this bit of code in header.php, but it does not work as desired: <?php if (is_archive() && ($paged > 1) && ($paged < $wp_query->max_num_pages)) { ?> <link rel=”prefetch” href=”https://wordpress.stackexchange.com/questions/138778/<?php echo get_next_posts_page_link(); ?>”> <link rel=”prerender” href=”https://wordpress.stackexchange.com/questions/138778/<?php echo get_next_posts_page_link(); ?>”> <?php } elseif (is_singular()) { ?> <link rel=”prefetch” href=”<?php bloginfo(‘home’); ?>”> … Read more

Remove frameborder attribute from iframes

The W3C Validator outputs an error because WordPress adds frameborder=”0″ to iframes. Also the Validator does not like the allow attribute. I found a similar question for Vimeo Videos: WordPress oEmbed W3C Validation. However, I couldn’t get it to work. That’s the code I added to the function.php file which however does not work: add_filter( … Read more

Writing a cache manifest file for a WordPress blog (app cache, offline web applications)

I’m wondering if anyone has implemented Offline Web Applications from HTML5 in a WordPress blog? When you write a manifest file, all files must be accounted for, thought you can specify the wildcard * in the NETWORK section. So, given how MANY files and dirs makeup a typical WordPress install, does anyone have guidance on … Read more