How to limit the max number of characteres in the title that are displayed

first add this function to your functions.php file function max_title_length($title){ $max = 20; return substr( $title, 0, $max ). ” …”; } then before the loop of the code you linked add this line to hook the above function: add_filter( ‘the_title’, ‘max_title_length’); and after the loop remove this filter: remove_filter( ‘the_title’, ‘max_title_length’); and just change … Read more

WordPress User Name Limitations

I think the answer is in the source. $username = wp_strip_all_tags( $username ); $username = remove_accents( $username ); // Kill octets $username = preg_replace( ‘|%([a-fA-F0-9][a-fA-F0-9])|’, ”, $username ); $username = preg_replace( ‘/&.+?;/’, ”, $username ); // Kill entities // If strict, reduce to ASCII for max portability. if ( $strict ) $username = preg_replace( ‘|[^a-z0-9 … Read more

Changing the username character limit from four to less characters

You can filter ‘wpmu_validate_user_signup’ and check if the error code matches the 4 character warning. Then just unset the error code. Sample plugin: <?php # -*- coding: utf-8 -*- /* Plugin Name: Allow short user names for multi site. */ add_filter( ‘wpmu_validate_user_signup’, ‘wpse_59760_short_user_names’ ); /** * Allow very short user names. * * @wp-hook wpmu_validate_user_signup … Read more

Elasticsearch: Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

Vivek’s answer is correct, however, the setting will only last for the duration of the session. If the host reboots, the setting will be reset to the original value. If you want to set this permanently, you need to edit /etc/sysctl.conf and set vm.max_map_count to 262144. When the host reboots, you can verify that the setting is still correct … Read more