Last active
April 21, 2020 11:53
-
-
Save sarangs07/28c55d6ca20adfc6a4c16a9b392998c5 to your computer and use it in GitHub Desktop.
Remove the Revo Theme conflict
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
/* | |
* How to add the custome code. | |
* | |
* Please follow below instructions: | |
* 1. Copy the below code. | |
* 2. Open your child theme's functions.php file. | |
* 3. Paste the copied code at the very bottom of it & save the file OR upload it on your server/hosting. | |
*/ | |
// Remove the Revo Theme conflict | |
// Call the function | |
add_action( 'wp', 'ma_remove_conflict_actions' ); | |
// Function to remove the action which is causing the conflict . | |
function ma_remove_conflict_actions(){ | |
global $post; | |
// Get current Post Type. | |
$post_type = get_post_type(); | |
// Get current page template type | |
$page_template = get_post_meta( $post->ID, '_wp_page_template', true ); | |
// This code will execute only on the CartFlows Pages and not others. | |
if( 'cartflows_step' == $post_type && 'default' != $page_template){ | |
// Solve the conflict | |
remove_action( 'wp_footer', 'revo_footer_advanced' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment