Adding a content rating system

Custom field will do the task. On the post page there’s nothing to do great, just create a Custom Field called agerating or age-rating. Authors will enter the value of the field according to their content with G/PG/R/X. Then at the frontend, edit single.php. Use this code inside the loop to retrieve the rating value: … Read more

Displaying all Custom fields on post except some

You will have to walk/map/filter the array before printing them. There’re plenty of array_*() functions provided by PHP for that. Example: $custom = get_post_custom(); // Remove all strings starting with `_` array_filter( $custom, function( $data, $name ) { return “_” !== substr( $name, 0, 1 ); }, ARRAY_FILTER_USE_BOTH ); foreach ( $custom as $field ) … Read more

Simple filter to change label name of Email Adress to something else

add_action( ‘user_new_form’, ‘change_label_form’ ); function change_label_form() { echo ‘<script> jQuery(document).ready(function($) { $(“label[for=email]”).html(“Example”); } ); </script>’; } here is trick worked for me , you can change the label for any filed by using the for tag in the label and you can add action on any form you like, as add_action( ‘edit_user_profile_update’, ‘change_label_form’ ); Here … Read more