How to remove Divi post status

Jan 3, 2019 | Divi Resources

How to drop “— Divi” appended after name of each page or post which uses Divi Builder

Since the Divi 3.18 update which was released after the Gutenberg editor was introduced in WordPress 5.0, there is post status introduced which shows if a page or post is created using Divi Builder.

It is done in form of a string “— Divi” added after Name of the pages in the list.

Users who do not want to keep this feature and remove it from their site can use the following snippet in the functions.php file of their child themes.

function remove_divi_post_status( $post_states, $post ) {
		// Make sure that $post_states is an array. Third party plugin might modify $post_states and makes it null
		// which create various issue (i.e. Piklist + Having a page configured as a static page)
		if ( ! is_array( $post_states ) ) {
			$post_states = array();
		}

		if ( et_pb_is_pagebuilder_used( $post->ID ) ) {
			// Remove Divi if existing
			$key = array_search( 'Divi', $post_states );
			if ( false !== $key ) {
				unset( $post_states[ $key ] );
			}
		}

		return $post_states;
}
add_filter('display_post_states','remove_divi_post_status', 11, 2);

The above code will get rid of the “— Divi” string appended after name of each page or post which uses Divi Builder.

Subscribe and Never Miss Out!

Posted By:
Arif
Dreamer, Schemer, Music & Technology enthusiast. He enjoys building things that speak HTTP. Arif is Development Head at Elicus and has over 13 years experience in the WordPress development industry.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Free Prebuilt Testimonial Section Layouts for Divi 5

Free Prebuilt Testimonial Section Layouts for Divi 5

Testimonials play a crucial role in building trust and credibility. A well-designed testimonial section helps showcase real client feedback, highlights positive experiences, and reassures visitors about your products or services. When presented effectively,...

Free Prebuilt Contact Section Layouts for Divi 5

Free Prebuilt Contact Section Layouts for Divi 5

A contact section is one of the most important parts of a website. It helps visitors get in touch with you easily, ask questions, request services, or start a conversation. A well-designed contact section improves usability, builds trust, and encourages user...

Free Prebuilt Hero Section Layouts for Divi 5

Free Prebuilt Hero Section Layouts for Divi 5

The hero section is the first thing people see when they open a website. A well-designed hero section helps visitors understand your message quickly and encourages them to scroll further. To make website building easier, we have created ready-made hero section layouts...

Divi WooCommerce Extended

Subscribe and Never Miss Out!