Export Form Data to a CSV then send it as an attachment – contact form 7

There are a few things omitted in the above solution, like defining the most params of wp_mail. Also I didn’t want to send yet another concurrent email, but instead attach the csv directly to the mail that wpcf7 sends. I think this is the cleaner solution. Here’s my take: add_filter( ‘wpcf7_before_send_mail’, ‘add_form_as_attachment’, 10, 3 ); … Read more

How should I be using filters and is_single together?

You can do this in functions.php, but you have to make sure the function is hooked into wp. Any earlier than that and is_single is undefined. Try adding this to functions.php: /** * Unhooks sixtenpresssermons_get_meta from the_content if currently on single post. */ function sx_unhook_sixtenpresssermons_get_meta() { // Do nothing if this isn’t single post if … Read more

How Do I Prevent An Image From Automatically Adjusting In Guttenberg Block Gallery?

Gutenberg is applying a flex-grow: 1; to the items, which allow it to fill the space. You override this by pasting the following into your css. .blocks-gallery-grid .blocks-gallery-image, .blocks-gallery-grid .blocks-gallery-item, .wp-block-gallery .blocks-gallery-image, .wp-block-gallery .blocks-gallery-item { flex-grow: 0; } Ideally, you do this in your theme, but if you urgently need this up, or if you … Read more

Update wordpress causes white space on admin

According to this post: How to fix the admin menu margin-top bug in WordPress 5.5? There is no solution yet, but maybe this will help you find one. Personally, I tested locally and on a SiteGround server, but I can’t recreate the problem. However, if you can tell yourself it’s a PHP error like the … Read more

Send clear password via mail

user_register isn’t the solution for your needs because when this action is trigger, the password is already encrypted. The best solution is to do a custom registration form and insert your new users with this hook: wp_insert_user() When a user is register, you can send a custom email with the password not encrypted.