Skip to content

Instantly share code, notes, and snippets.

View amElnagdy's full-sized avatar

Ahmed Mohammed Nagdy amElnagdy

View GitHub Profile
@amElnagdy
amElnagdy / functions.php
Last active January 7, 2017 23:43
Divi Builder on custom post types
<?php
// Divi Builder on custom post types
add_filter('et_builder_post_types', 'divicolt_post_types');
add_filter('et_fb_post_types','divicolt_post_types' ); // Enable Divi Visual Builder on the custom post types
function divicolt_post_types($post_types)
{
foreach (get_post_types() as $post_type) {
if (!in_array($post_type, $post_types) and post_type_supports($post_type, 'editor')) {
<?php
get_header();
if(have_posts()) : while(have_posts()) : the_post();
the_title();
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile; endif;
get_footer();
?>