How can I make a shortcode from this code?
It should be as simple as this: function item_count() { $dir=”/PATH TO DIRECTORY/”; $filecount = 0; $d = dir( $dir ); while ( $f = $d->read() ) { if ( ( $f!= “.” ) && ( $f!= “..” ) ) { if( ! is_dir( $f ) ) { $filecount++; } } } return ‘(‘ . … Read more