How Do Post Formats Fit Into a Block Theme World?

Featured Imgs 08

Over the weekend, Nick Bohle asked Ellen Bauer of Elma Studio how post formats fit into the block-theming world. The question was a proposal for her a WordPress theme and FSE chat she held yesterday via Twitter Spaces. I could not attend and see if Bauer touched on the subject, but the question is something I have given a lot of thought to not that long ago.

Over the summer, I tweeted out a screenshot of an experiment around post formats. A part of me was trying to figure out if we could revive a dying feature, one I continue to use today.

Archive page in WordPress showing aside posts, each with a different-colored background.
Aside post format archive.

I have been using post formats since before they were a thing. “Asides” were one of the precursors to the feature landing in WordPress. I wrote my first on my personal blog back in 2006. I had borrowed some code that WordPress cofounder Matt Mullenweg had posted two years earlier. It was a concept he had borrowed from others.

For me, it was a way to give a unique layout to quick posts and links without all the beefiness of a long-form article.

In 2011, WordPress 3.1 launched with a new taxonomy. Users could choose between nine different formats for their posts, assuming their theme supported one or more of them. The goal was to allow theme authors to design custom layouts around each one.

For much of the community, it felt like WordPress was chasing Tumblr’s post content feature. The allure quickly wore off after it seemed to have hit a standstill beyond its initial release. Besides a few fixes and trivial enhancements under the hood, post formats never amounted to much.

They have remained a niche feature over the years. A few theme authors still add in support. Some of us old-school bloggers who have been using them in some form or fashion are still hanging on. But, post formats have been dead for a long time.

Therefore, I decided to try to make them work for block themes.

One of the most frustrating things I encountered with post formats in this block-based theme project was how powerless I felt over making them work “the old way.” The dynamic nature of classic theming meant that I could switch post content templates out on pages that listed multiple posts. Query Loop and its inner Post Template block do not allow me to show a different template for a quote or gallery-formatted post, for example.

This was frustrating because that part of the design process was out of my hands. If I wanted to do something as simple as show an entirely different design for an aside post within a mix of normal posts, I could not do so as the theme designer, at least not without doing some hacky workarounds.

My “light bulb” moment was when I realized that it was OK to not have that control. I needed to get outside of the mindset that the design was mine and mine alone. That is viewing creation through a classic theming lens. My approach was wrong. Instead, I had to start thinking about how to hand over these design tools to the user.

The question became: Can I create something that utilizes that original post format concept while giving users the freedom to do what they want?

Then, it dawned on me. The following is the response I tweeted to Jeff Chandler, who had asked if I thought post formats would work as patterns:

I think of blocks themselves as an evolution of post formats. Video, audio, embeds (basically cool links), quotes, etc. Most of the elements are already there. Patterns just give users an easy way to insert various designs, which could build off those blocks.

Maybe post formats as they currently exist are dead. However, the idea of designing a layout around specific types of posts is very much alive.

If users want to embed a single video into a post, it is just a matter of copying and pasting a link. To share a quote they found from their favorite author, they merely need to drop it into a Quote block. Other than chat posts (let’s just gloss over those entirely), the concept of post formats has simply been replaced with blocks.

However, theme authors still have a role to play. If all the elements for post formats have been essentially replaced by blocks themselves, that means designers can have a field day building patterns around them.

The WordPress patterns explorer with the Post Formats category open.  On the right, it shows three aside designs and one quote design.
Patterns built for post formats.

That led me to build off my original idea for asides, my favorite post format. Instead of offering a single design, I built three different patterns for users to choose from. End-users could mix and match how they appeared on the front end.

I also built a custom taxonomy-post_format-aside.html template to showcase them on their archive page. It merely displayed the published date and the post content, which the user controls.

I went back to the drawing board and built a quote pattern that I liked. Again, it would be up to the user whether they wanted that particular design. They could always go in a different direction.

A quote block within the WordPress editor.  It is wrapped in a Group block with a light blue background.
Quote block pattern and custom style.

In some ways, post formats were always limiting. The feature was never fleshed out, and there were only nine allowed formats. At the end of the day, each was merely a term within a taxonomy. There were never any rules about how it all was supposed to work. Maybe that is not such a bad thing. Now, posts can be anything users want them to be.

I tried to do codes to get e^x by using maclaurin series but it gives 0 .

558fe5180e0e8fc922d31c23ef84d240

#include <stdio.h>
#include <math.h>

int main()

float i, x;
double fact=0, sum=0;

printf("Enter value of x as the power of e: ");
scanf("%f", &x);

printf("Enter n as the number of terms:  ");
scanf("%d",&i);    

for (i = 0; i < 99999; i++)

{   
    sum = 1 + x;
    fact = fact * i;
    sum = sum + pow(x, i)/(fact);   
}
if (sum == sum)

printf("The value of e^%f is %lf",x,sum);

return 0;

How to Disable New User Notifications in WordPress (Easy Way)

Category Image 051

Do you want to stop receiving new user email notifications in WordPress?

If you have enabled user registration on your site, then WordPress sends a notification email to the admin email address every time a new user registers. As your site grows, you will get many new users joining every day, which can make these emails annoying to deal with.

In this article, we will show you how to disable new user notifications in WordPress.

Disable new user notification in WordPress

Why Disable User Notification Emails in WordPress?

Allowing user registration in WordPress has a lot of benefits. If you have a multi-author blog, online store, or membership website, then user registrations are necessary.

However, there is also a downside. WordPress will send an email by default to the admin email address, notifying you whenever a new user registers.

While these emails are good for keeping an eye on who is registering on your website and keeping out spam registrations, they can be annoying to deal with if you have several people joining each day.

Having a lot of new user notifications can clutter your email inbox, making it difficult to spot important emails from your clients and customers.

This is where disabling emails about new users can come in handy. We will look at two beginner-friendly ways to help you turn off email notifications. The best part is that you won’t have to know how to write code.

Let’s look at how to disable new user notifications in WordPress using WP Mail SMTP and WPCode:

Method 1: Disable New User Notifications Using WP Mail SMTP

If you are take better control of your WordPress emails, including new user notifications, then this method is for you.

WP Mail SMTP is the best WordPress SMTP plugin on the market that can dramatically improve your email deliverability.

The plugin fixes the problem of emails not being delivered to your customers. That means that all your emails will reach your users instead of ending up in their spam folders or being blocked completely.

WP Mail SMTP website

WP Mail SMTP also offers different settings to take control of your WordPress emails, such as disabling automatic update notifications. Among these settings is the option to disable new user notification emails sent to the admin’s email.

Note: For this tutorial, we will be using the WP Mail SMTP Pro version since it includes the Email Control options. There is also a free version of WP Mail SMTP that you can use to fix email deliverability issues on your site.

First, you will need to install and activate the WP Mail SMTP plugin on your WordPress site. If you need help, then follow our step-by-step guide on how to install a plugin.

Upon activation, go to WP Mail SMTP » Settings from your WordPress admin panel and then enter your license key. You can find the license key in your WP Mail SMTP account area.

WP Mail SMTP verify key

After entering the key, go ahead and click the ‘Verify Key’ button.

You will now see a popup showing that you have successfully verified the key, and your WordPress website will receive automatic updates.

verification key confirmed

Next, you can head over to the ‘Email Controls’ tab from the menu on the top in WP Mail SMTP.

This is where you can customize your new user registration email notifications.

Email controls

After that, simply scroll down to the New User section.

Then, you need to click on the toggle to disable the ‘Create (Admin)’ option. And don’t forget to hit ‘Save Settings’ when you are done.

New user

Once this setting is toggled off, the admin won’t receive the default WordPress email from new users. However, the new user who registered will still get an email confirmation.

That’s it! You’ve successfully disabled new user notification emails for admins using the WP Mail SMTP plugin.

Method 2: Disable New User Emails in WordPress Using WPCode

If you don’t want to use an SMTP plugin, then you can add a code snippet to your theme’s functions.php file or use a code snippet plugin to disable email notifications:

<?php
function wpcode_send_new_user_notifications( $user_id, $notify = 'user' ) {
	if ( empty( $notify ) || 'admin' === $notify ) {
		return;
	} elseif ( 'both' === $notify ) {
		// Send new users the email but not the admin.
		$notify = 'user';
	}
	wp_send_new_user_notifications( $user_id, $notify );
}

add_action(
	'init',
	function () {
		// Disable default email notifications.
		remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
		remove_action( 'edit_user_created_user', 'wp_send_new_user_notifications' );

		// Replace with custom function that only sends to user.
		add_action( 'register_new_user', 'wpcode_send_new_user_notifications' );
		add_action( 'edit_user_created_user', 'wpcode_send_new_user_notifications', 10, 2 );
	}
);

We don’t recommend editing your functions.php file directly. That’s because even the tiniest of mistakes in the code snippet can make your site inaccessible.

The easiest way to add custom code in WordPress without breaking your site is with the free WPCode plugin. It is the most popular code snippets plugin, used by 2 million+ WordPress websites.

The first thing you will need to do is install and activate the WPCode plugin in WordPress. For more detailed instructions, see our step-by-step guide on how to install a WordPress plugin.

Head over to Code Snippets » + Add Snippet in the WordPress site admin area. There, you will see a library of code snippets to choose from.

The good news is that WPCode has a pre-made template for disabling new user notification emails. Just type in ‘user’ in the search bar and click ‘Use snippet’ under the ‘Disable New User Notifications’ snippet.

Add disable new user notification snippet

Since the template already has the code inside, you don’t have to write your own.

You will see the code already in place with the ‘Code Type’ set as a PHP snippet.

Disable new user notifications code snippet

If you want to adjust where this code runs, you can scroll down. The Insertion method should be set to ‘Auto Insert’.

You can open the dropdown menu to decide where you want the code to be executed or even set a schedule for when you want the code to be active.

Insertion method in WPCode

For example, you can set the code snippet to disable user registrations from certain pages. This could be handy if you have custom user registration pages for different membership programs.

You can even choose to have the code only disable user registrations from WooCommerce, Easy Digital Downloads, or MemberPress.

Woocommerce auto insert

But for most website owners, leaving the default setting to ‘Run Everywhere’ is the way to go.

Once you are done configuring where to execute the code snippet, you can scroll to the top right corner and toggle the ‘Inactive’ button to ‘Active’ to activate the code.

Inactive button in WPCode

You have now successfully disabled the new user notification emails.

Don’t forget to click the ‘Update’ button to save your changes.

Update button in WPCode

Bonus: Turn Off Comments Notifications in WordPress

WordPress notifications can be super annoying. If your website receives a high volume of traffic, particularly on older posts, then you may also be flooded by comment notification emails.

The good news is that there’s a quick fix for this.

All you have to do is go to Settings » Discussion. The comment notification emails are automatically enabled by default in WordPress.

Turn off comments notifications in WordPress

You can disable comment notifications by unchecking the boxes next to ‘Anyone posts a comment’ and ‘A comment is held for moderation’. That way, you won’t receive emails when someone posts a comment or when a comment is held for moderation.

For more details, check out our post on how to turn off comments notifications in WordPress.

We hope this article helped you disable new user notification emails in WordPress. You may also want to see our guide on how to disable WordPress admin email verification notices or our expert comparison of the best email marketing services to grow your audience.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Disable New User Notifications in WordPress (Easy Way) first appeared on WPBeginner.