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 dpdfg_custom_loader() { | |
ob_start(); | |
?> | |
<div class="dp-dfg-loader">[insert your loader HTML here]</div> | |
<style> | |
/* ADD YOUR LOADER'S CSS HERE */ | |
</style> | |
<?php |
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 dpdfg_custom_loader() { | |
ob_start(); | |
?> | |
<div class="dp-dfg-loader"><div class="my_custom_loader"></div></div> | |
<style> | |
.dp-dfg-loader { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin-top: -30px; |
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
// DFG CUSTOM QUERY - RELATED POSTS | |
function dpdfg_custom_query($query_args, $props) { | |
if (isset($props['module_class']) && $props['module_class'] == "dfg-related-posts") { | |
$current_post_id = $props['the_ID']; | |
$terms_of_current_post = get_the_terms($current_post_id, 'category'); | |
$terms_ids = array(); | |
foreach ($terms_of_current_post as $term_object) { | |
$terms_ids[] = $term_object->term_id; | |
} | |
return array( |
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 dpdfg_after_read_more() { | |
return '<a class="button et_pb_button" href="#">Click Me</a>'; | |
} | |
add_filter('dpdfg_after_read_more', 'dpdfg_after_read_more'); |
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 dpdfg_after_read_more() { | |
$custom_field = get_post_meta( get_the_ID(), 'my_custom_field', true ); | |
return '<a class="button et_pb_button" href="'.$custom_field.'">CLICK ME</a>'; | |
} | |
add_filter('dpdfg_after_read_more', 'dpdfg_after_read_more'); |
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 dpdfg_after_read_more($content, $props) { | |
if (isset($props['module_id']) && $props['module_id'] === 'custom-content') { | |
return '<a class="button et_pb_button" href="#">Click Me</a>'; | |
} else { | |
return 'This module does not have CSS ID custom-content'; | |
} | |
} | |
add_filter('dpdfg_after_read_more', 'dpdfg_after_read_more', 10, 2); |
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 dpdfg_after_read_more() { | |
ob_start(); | |
echo do_shortcode('[your_shortcode_handle]'); | |
return get_ob_clean(); | |
} | |
add_filter('dpdfg_after_read_more', 'dpdfg_after_read_more'); |
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 dp_ocp_custom_content() { | |
return '<a class="button et_pb_button" href="#">Click Me</a>'; | |
} | |
add_filter('dp_ocp_custom_content', 'dp_ocp_custom_content'); |
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 dp_ocp_custom_content() { | |
$custom_field = get_post_meta( get_the_ID(), 'my_custom_field', true ); | |
return '<a class="button et_pb_button" href="#">'.$custom_field.'</a>'; | |
} | |
add_filter('dp_ocp_custom_content', 'dp_ocp_custom_content'); |
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 dp_ocp_custom_content($content, $props) { | |
if (isset($props['module_id']) && $props['module_id'] === 'custom-content') { | |
return '<a class="button et_pb_button" href="#">Click Me</a>'; | |
} else { | |
return 'This module does not have CSS ID custom-content'; | |
} | |
} | |
add_filter('dp_ocp_custom_content', 'dp_ocp_custom_content', 10, 2); |
OlderNewer