• According to the Theme Review Guidelines:

    Themes must not generate any WordPress deprecated-function notices, PHP errors, warnings, or notices, HTML/CSS validation errors, or JavaScript errors.

    That means any theme that uses the_category() won’t pass the guidelines. I appreciate the strict requirements for themes posted here, but shouldn’t basic WordPress functions facilitate this? What do you guys think?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Clicknathan

    (@clicknathan)

    To clarify, the_category() doesn’t pass HTML validation because it outputs a rel="category" attribute which W3C tells me is a big no-no.

    Thread Starter Clicknathan

    (@clicknathan)

    I’d still love to hear anyone’s thoughts / opinions on this but I’ve written up some code to replace the_category() with a function that outputs valid code:

    The full rundown here.

    But essentially, here’s the function:

    // Create a function to output valid category links
    function the_category_valid() {
     $categories = get_the_category();
    	  $separator = ', ';
    	  $output = '';
    	  if($categories){
    		  foreach($categories as $category) {
    			  $output .= '<a href="'.get_category_link($category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$category->cat_name.'</a>'.$separator;
    		  }
    		  echo trim($output, $separator);
    	  }
    }

    I suppose it could be customized even further to allow for all of the various functionality of WordPress’ the_category() but that’s a good start. Feel free to improve!

    HTML/CSS validation is not strictly enforced, and has not been for some time. HTML validation is too ethereal, and not nearly important enough, to warrant strict enforcement.

    HTML/CSS validation is only enforced so far as: don’t break anything with your markup, such as with improperly nested tags/unclosed containers/etc.

    Thread Starter Clicknathan

    (@clicknathan)

    Hey thanks for the reply, Chip, always very appreciated to hear back from someone other than myself. 🙂

    I absolutely love these resources by the way. Makes developing themes for my clients so much easier to test and ensure.

    I updated to latest WP application. Lost my new post template. Then the site (Godaddy host)went down. Something in WP changed the Godaddy HT access file. We had to rename it to bring the site back up. Now I get a message from Google that they cannot access the robots.txt file.. I installed a WP site map plugin but cannot access the HTML to repair the errors. And of course, NO HELP FROM WP. Im trying to get a management name from San Francisco WP to see why we get no help except from outdated and closed forums. http://www.codeforeblog.com

    @codefore

    please start a new topic;

    your problem has nothing in common with the current topic.

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Conflicts in Testing WordPress Themes’ is closed to new replies.