Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #268789

    Has anyone run into this problem with Ninja Forms? All media, both attached and unattached, shows up with the following prefix in the breadcrumbs:

    “You are here:Home / ninja_forms_preview_page / [Folder and File Name of Media]”

    Anyone seen this, and do you have any quick fixes besides turning off breadcrumbs? I had to turn off all media SEO because obviously you can’t have users seeing this. I have a ticket open in NF.

    Thanks,
    Frank

    #269006

    Hey Frank!

    You can try to add this code to your child theme functions.php file (or enfold/functions.php):

    
    add_filter('avia_breadcrumbs_trail', 'avia_change_breadcrumb', 10, 15);
    function avia_change_breadcrumb($trail) {
            foreach($trail as $key => $data)
            {
                    $search = 'ninja_forms_preview_page';
                    if(strpos($data, $search) !== false)
                    {
                                      unset($trail[$key]);
                    }
            }
    return $trail;
    }
    

    The code should remove the ninja_forms_preview_page link from the breadcrumb trail.

    Regards,
    Peter

    #269022

    Thanks for that code snippet. But unfortunately that didn’t work. I got a white screen!

    Frank

    #269031

    Hi!

    Please copy the code from here: https://kriesi.at/support/topic/ninja-forms-preview-shows-up-in-breadcrumbs-for-all-media/#post-269006 into the functions.php file (insert it at the very bottom). I tested it and it doesn’t trigger any errors on my test server. If it still doesn’t work on your server it might be a conflict with the Ninja Forms plugin…

    Regards,
    Peter

    #269040

    It works! Wish I could code like that.

    Thanks,
    Frank

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Ninja Forms Preview Shows Up in Breadcrumbs For ALL Media’ is closed to new replies.