Remove Extra Classes from Post Title

Try this. // **** Remove unwanted classes function remove_classes($classes, $class, $post_id) { // Array that holds the undesired classes $removeClasses = array( ‘category-‘, ‘tag-‘ ); // Array to store the new class names $newClasses = array(); foreach ($classes as $_class) { // Iterate through the array of undesired classes and // check if the current … Read more

Where to add_filter in theme functions.php?

Usually, it would be the best to add at the bottom of the script, to make sure everything you use inside the snipped is declared already and ready to use. It all depends on the actual code you’re using and your goal.

How to validate recaptcha on comments form?

There’s a preprocess_comment filter that is run before the comment is inserted in the database. You will have access to the comment’s data: add_filter( ‘preprocess_comment’ , ‘wpse321083_process_recaptcha’ ); function wpse321083_process_recaptcha( $commentdata ) { // Process recaptcha here return $commentdata; } Here’s also a good article on SitePoint.com explaining how to implement this feature in your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)