Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 735 Bytes

File metadata and controls

31 lines (26 loc) · 735 Bytes
  1. Remove widget title
// REMOVE WIDGET TITLE IF IT BEGINS WITH EXCLAMATION POINT
add_filter( 'widget_title', 'remove_widget_title' );
function remove_widget_title( $widget_title ) {
    if ( substr ( $widget_title, 0, 1 ) == '!' )
        return;
    else
        return ( $widget_title );
}
  1. Remove style inline
add_filter('wp_generate_tag_cloud', 'remove_tagcloud_inline_style',10,1);
function remove_tagcloud_inline_style($input){
  return preg_replace('/ style=("|\')(.*?)("|\')/','',$input);  
}
  1. Limit tag
function prefix_widget_tag_cloud_args( $args ) {
    $args['number'] = 5;
    return $args;
}
add_filter( 'widget_tag_cloud_args',    'prefix_widget_tag_cloud_args',      10, 1 );