Limit username to specific characters (A-Z and 0-9)

Using the regex posted by Moaz (and adding capitals), we will need to hook into the registration_errors filter: // Restrict username registration to alphanumerics add_filter(‘registration_errors’, ‘limit_username_alphanumerics’, 10, 3); function limit_username_alphanumerics ($errors, $name) { if ( ! preg_match(‘/^[A-Za-z0-9]{3,16}$/’, $name) ){ $errors->add( ‘user_name’, __(‘<strong>ERROR</strong>: Username can only contain alphanumerics (A-Z 0-9)’,’CCooper’) ); } return $errors; }

Latest post on specific category and custom css

Replace the ‘#textbox’ html with the following and css: <div class=”textbox”> <div class=”textbox_left”> <p class=”txtclhome”><?php dynamicnews_display_thumbnail_index(); ?> </p> </div> <div class=”textbox_right”> <h3 class=”titlehome”><a href=”https://wordpress.stackexchange.com/questions/166010/<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></h3> <p class=”txtclrhome”><?php the_content_limit(150, “”); ?> <a class=”morelink” href=”http://styleposts.com/?cat=41″ rel=”bookmark”><?php _e(“Read More”, ‘organicthemes’); ?></a></p> </div> </div> </div> .textbox{ overflow: hidden; } .textbox_left{ width: 60%; float: left; } … Read more

limit posts per page

I changed the first line of my code to this and it worked to limit the posts $allcats = get_categories(array(‘child_of’ => get_query_var(‘cat’), ‘number’ => 3,’order’=> ‘asc’)); Now on to the next problem…Pagination