Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3402018
Remove Fly Cart from Certain Pages
Closed

Comments

  • Ally started the conversation

    Hi,

    I have a blog and shop on my WordPress site, but I want to remove the fly cart from certain pages only that aren't associated with woocommerce, like on this page for example: https://www.katandblossom.com/veganweightloss


    Is there a way of doing that?


    Thanks.

  •  767
    Janilyn replied

    Hi Ally,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,222
    Dustin replied

    Hi Ally,

    Please add the below custom code (How to add custom code?)

    add_filter( 'woofc_disable', function ( $disable ) {
        $page_ids = [ 99, 102, 138, 2871, 3758 ]; // page IDs that you want to hide Fly Cart
        global $wp_query;
        if ( ( $current_page_id = intval( $wp_query->queried_object->ID ) ) && in_array( $current_page_id, $page_ids ) ) {
            return true;
        }
        return $disable;
    } );

    [ 99, 102, 138, 2871, 3758 ] are the IDs of pages that you want to hide Fly Cart. You can find the page ID here https://app.screencast.com/IKOpaj2NKO3kt

    Best regards,
    Dustin