Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #602920

    Hey,

    I want to modify the breadcrumbs PHP file (I am trying to exclude the woocommerce default shop page from the breadcrumb as this page is difficult to style).

    I am using a child theme.

    If I place my modified class-breadcrumbs file into an identical folder structure in my child theme it doesnt work.

    How can I get enfold to use my custom PHP file in my child theme and ignore the one in the parent enfold theme?

    Thanks :)

    #603864

    Hi byteben!

    Please check out this video

    Make sure the path is correct and include the exact files path… When you don’t wordpress will only recognize some files like header.php, footer.php etc

    Example:

    Parent Theme > file
    Child Theme > file

    Parent Theme > folder / file
    Child Theme > folder / file

    Please refer to https://wordpress.org/support/topic/overriding-parent-theme-sub-files-with-a-child-theme-how for more details.

    Detailed info here https://developer.wordpress.org/themes/advanced-topics/child-themes/

    Best regards,
    Vinay

    #658326

    Hey guys,

    I did exactly what the video said with the class-breadcrumb.php, but still the original one is chosen over the one in my childtheme…
    I have the file in childtheme/framework/php/, so the path is correct.

    All i wanted to do is chnage the max-length of the title displayed from 70 to 30, but when i change it back in the original theme, its back to 70, even though i changed it to 30 in the childtheme…
    How come this wont work?

    Thanks,
    Max

    • This reply was modified 8 years, 4 months ago by mkdreirad.
    #659233

    Hi,

    Please add following code to functions.php file of your child theme instead

    
    add_filter('avia_breadcrumbs_args', 'avia_change_bc_truncate', 50, 1);
    function avia_change_bc_truncate($args){
        $args['truncate'] = 30;
        return $args;
    }

    Best regards,
    Yigit

    #659237

    Thanks Yigit!
    But can you tell me why the childtheme wont work? I mean it’s solved, but just so i know…

    #659252

    Hi!

    Making changes on those files are a little bit more complicated than doing on files like header.php :)
    You are welcome! Let us know if you have any other questions or issues :)

    Regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Replace class-breadcrumbs.php in child theme’ is closed to new replies.