Skip to content
This repository
Browse code

Added function to remove classes from page list items

  • Loading branch information...
commit 96f841cba8e60f5c659aad5f4676e4c9c929df61 1 parent ff9de2a
Grant Hutchinson authored

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. +14 0 functions.php
14 functions.php
@@ -26,7 +26,21 @@ function simple_post_class() {
26 26
27 27 add_filter( 'post_class', 'simple_post_class' );
28 28
  29 +
  30 +
  31 +// Remove list item classes from page listing
  32 +
  33 +function declass($c) {
  34 + return preg_replace('/<li class=\".+?\">/', '<li>', $c , -1);
  35 +
  36 +}
  37 +
  38 +add_filter('wp_list_pages','declass');
  39 +
  40 +
  41 +
29 42 // Add support for the_post_thumbnail
  43 +
30 44 if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
31 45 add_theme_support( 'post-thumbnails' );
32 46 set_post_thumbnail_size( 600, 9999, true ); // Normal post thumbnails

0 comments on commit 96f841c

Please sign in to comment.
Something went wrong with that request. Please try again.