two search forms on the same page

The get_search_form function doesn’t work like that. The parameter that is accepted only specifies if the HTML content is being returned or outputted directly. So this parameter should be a boolean. It still works in your case because PHP simply evaluates the string that you are passing as true considering that it is not an … Read more

Hook for altering the content of all wp mails

Yes, there is a filter for this. The correct filter is wp_mail and is defined in /wp-includes/pluggable.php Line 135 So the code (maybe in your functions.php) should look something like this: function mail_template($args){ ob_start(); require_once (get_template_directory() . ‘/mail-templates/contacemail.php’); $args[‘message’] = ob_get_contents(); ob_end_clean(); return $args; } add_filter(‘wp_mail’, ‘mail_template’);

Related Posts: Changing Function For Posts Per Page

I have gone through your code and found that the function longform_the_related_posts displays 8 related posts. This function is defined in functions.php of parent theme and called in single.php. Thus, to override the function, follow below steps – 1. Create another function that displays 4 related posts in functions.php of child theme. (As you have … Read more

Function not saving unchecked checkbox

Strictly by what I see in your code: you are trying to unset incorrectly, unset works by means of an array key and you are using $term_id which is a value. You need to find the index in the array for that $term_id: function wpfs_save_tax( $term_id ) { $featured_tax = get_option( ‘_featured_tax’ ); if ( … Read more