This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Divi Meta Box to custom post type | |
add_action( 'add_meta_boxes', 'divi_add_post_meta_box' ); | |
function divi_add_post_meta_box() { | |
add_meta_box( 'et_settings_meta_box', esc_html__( 'Divi Post Settings', 'Divi' ), 'et_single_settings_meta_box', 'custom_post_type_slug', 'side', 'high' ); | |
} | |
if ( ! function_exists( 'et_single_settings_meta_box' ) ) : | |
function et_single_settings_meta_box( $post ) { | |
$post_id = get_the_ID(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(document).ready(function() { | |
function toggle_dps() { | |
setTimeout(function(){ | |
$('.et_pb_page_layout_settings' ).closest( '#et_settings_meta_box' ).find('.et_pb_page_layout_settings').show(); | |
},150); | |
} | |
if ($('body').hasClass('post-type-slug')) { | |
toggle_dps(); | |
$('#et_pb_toggle_builder').click(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Page Layout to CPT Meta Box | |
function divi_override_js() { | |
wp_enqueue_script( 'custom_script', get_stylesheet_directory_uri() .'/custom_script.js', array( 'jquery'), '1', true ); | |
} | |
add_action('admin_enqueue_scripts','divi_override_js',1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id="unique-string">I'm target text</p> or <h2 id="unique-string">I'm target Heading</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="top"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#top">top</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__('string' , 'theme_text_domain'); | |
and | |
_e('string' , 'theme_text_domain'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__(‘Hello World’, 'theme_text_domain'); |
OlderNewer