WordPress.org

Ready to get started?Download WordPress

Forums

Dodo
Dodo theme: possible W3C validation correction (2 posts)

  1. design_dolphin
    Member
    Posted 2 years ago #

    Theme: Dodo
    Theme version: 1.2.1
    WordPress version: 3.2.1

    First off thank you for building this wonderful theme. It's simplicity is a pleasure to work with.

    This theme version uses strict as DOCTYPE. This unfortunately causes an error for the following code in footer.php in the W3C HTML validator:

    <p>Theme Designed by <a href="http://www.inspiredbuddy.com">Rajveer Singh Rathore</a> · Powered by <a href="http://www.wordpress.org/" target="_blank">WordPress</a></p>

    Changing the code to:

    <p>Theme Designed by <a href="http://www.inspiredbuddy.com">Rajveer Singh Rathore</a> · Powered by <a href="http://www.wordpress.org/">WordPress</a></p>

    Fixes it according to the W3C validator.

    http://wordpress.org/extend/themes/dodo/

  2. diogorighi
    Member
    Posted 2 years ago #

    It's just because the XHTML validator do not support the target="_blank" anymore. If you remove it, it will open the link in the same window.

    If you want to validate AND open in another window, you can use javascript:

    window.onload = function() {
        var links = document.getElementsByTagName('a');
        for (var i=0;i < links.length;i++) {
            if (links[i].className == 'new-window') {
                links[i].onclick = function() {
                    window.open(this.href);
                    return false;
                };
            }
        }
    };

    Or JQuery:

    $(function(){
        $('a.new-window').click(function(){
            window.open(this.href);
            return false;
        });
    });

    Remember to add the class "new-window" to your a element.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags