Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #874192
    strobley
    Participant

    Hi Themeco,

    I’m trying to remove x_functions in my child theme functions.php

    The functions are x_ethos_entry_top_navigation and x_entry_navigation relate to navigation elements on the Single Product Page, the link to shop and previous/next – https://theme.co/x/demo/shop/ethos/product/happy-ninja/

    The function are located in x/framework/functions/global/content.php and x/framework/functions/ethos.php

    I’ve followed https://community.theme.co/forums/topic/not-possible-to-override-x_woocommerce_shop_product_thumbnails-in-child-theme/#post-376092

    
    function remove_x_ethos_entry_top_navigation() {
        remove_action( 'remove_x_ethos_entry_top_navigation', 'x_ethos_entry_top_navigation', 20 );
    }
    add_action( 'init', 'remove_x_ethos_entry_top_navigation', 20 );
    function remove_x_entry_navigation() {
        remove_action( 'remove_x_entry_navigation', 'x_entry_navigation', 20 );
    }
    add_action( 'init', 'remove_x_entry_navigation', 20 );

    However is does not work.

    As you know the function is a follows: https://developer.wordpress.org/reference/functions/remove_action/
    I’m not sure the $tag is correct, and do know what do use in relation to these X functions.

    I understand I can hide them with CSS but I wish to remove them completely from the markup by removing the functions.

    Please let me know to remove these X functions using the child theme and functions.php

    Many thanks.

    #874361
    Thai
    Moderator

    Hi There,

    To remove that navigations, please add the following CSS under Customizer > Custom > CSS:

    .entry-top-navigation {
        display: none;
    }

    Hope it helps 🙂

    #874420
    strobley
    Participant

    Hi Thai,

    As I clearly said, I know I can hide them with CSS. I’d like to remove them from the markup and completely remove these X functions using fuctions.php in my childtheme.

    Please advise on how to do this or ask the Developers.

    Thanks.

    #874920
    Rue Nel
    Moderator

    hey @Strobley,

    Thanks for the updates!

    To remove the markup completely using a function override, simply use this custom function in your child theme’s functions.php file

    // Override Entry Top Navigation
    // =============================================================================
    function x_ethos_entry_top_navigation() {
       return; // will not return anything.
    }
    // =============================================================================

    We would loved to know if this has work for you. Thank you.

    #1042149
    strobley
    Participant

    Hi Rue,

    Sorry for not getting back to you sooner, this worked perfectly 🙂

    Thanks again!

    #1042213
    Rahul
    Moderator

    Thank you for letting us know!

  • <script> jQuery(function($){ $("#no-reply-874192 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>