Okay
  Public Ticket #2413164
overidding theme functon
Closed

Comments

  • Marzia Agnetti started the conversation

    hello! I have a problem. I needed to use some wp bakery elements you have disabled. I know you may not recommend it, but they work well on theFox.

    I went in themes/theFox/functions/vc-functions.php, from row 189 and un-commented some elements.

    Any time I update the theme I have to remember that. Which is not easy.

    Please any help to ovverride function in child theme?

    Thanks!

  •  892
    TheFox replied

    Hello Marzia,

    Currently this is not possible but you are right, we will ask our team to add a hook for those function so you can overwrite it in the child theme.

    It should be available next week.

    Thanks for the feedback!

    Best regards

  • Marzia Agnetti replied

    Thank you so much!! :)

  •  892
    TheFox replied

    Hello again,

    The update will be live in 30~1hour.

    What you need to do after updating the theme is copy this into your child theme functions.php :

    function thefox_vc_remove_elements() {
      vc_remove_element( 'vc_separator' );
      vc_remove_element( 'vc_text_separator' );
      vc_remove_element( 'vc_message' );
      vc_remove_element( 'vc_toggle' );
      vc_remove_element( 'vc_gallery' );
      vc_remove_element( 'vc_posts_slider' );
      vc_remove_element( 'vc_images_carousel' );
      vc_remove_element( 'vc_button' );
      vc_remove_element( 'vc_btn' );
      vc_remove_element( 'vc_cta' );
      vc_remove_element( 'vc_button2' );
      vc_remove_element( 'vc_cta_button' );
      vc_remove_element( 'vc_cta_button2' );
      vc_remove_element( 'vc_flickr' );
      vc_remove_element( 'vc_progress_bar' );
      vc_remove_element( 'vc_pie' );
      vc_remove_element( 'vc_basic_grid' );
      vc_remove_element( 'vc_media_grid' );
      vc_remove_element( 'vc_masonry_grid' );
      vc_remove_element( 'vc_masonry_media_grid' );
      vc_remove_element( 'vc_icon' );
      vc_remove_element( 'vc_wp_search' );
      vc_remove_element( 'vc_element-description' );
      vc_remove_element( 'vc_wp_recentcomments' );
      vc_remove_element( 'vc_wp_calendar' );
      vc_remove_element( 'vc_wp_pages' );
      vc_remove_element( 'vc_wp_tagcloud' );
      vc_remove_element( 'vc_wp_custommenu' );
      vc_remove_element( 'vc_wp_text' );
      vc_remove_element( 'vc_wp_posts' );
      vc_remove_element( 'vc_wp_categories' );
      vc_remove_element( 'vc_wp_archives' );
      vc_remove_element( 'vc_wp_rss' );
      vc_remove_element( 'vc_wp_meta' );
      vc_remove_element( 'vc_tta_tabs' );
      vc_remove_element( 'vc_tta_tour' );
      vc_remove_element( 'vc_tta_accordion' );
      vc_remove_element( 'vc_line_chart' );
      vc_remove_element( 'vc_round_chart' );
      vc_remove_element( 'vc_tta_pageable' );
      vc_remove_element( 'vc_hoverbox' );
    }
    thefox_vc_remove_elements();

    And just delete the line of the elements you want to keep.

    Best regards

  • Marzia Agnetti replied

    It seems to work!!

    THANK YOU THANK YOU SO MUCH! :)))


  •  892
    TheFox replied

    Glad to hear thatsmile.png

    Do not hesitate to contact us if you have more questions.

    Have a nice day!

    Best Regards.