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

    Dear Support,

    As much as I love Enfold, some things are just annoyingly persistent.
    I have 2 Portfolio categories, each category has its own page with a portfolio grid for items of ONLY that category.
    Breadcrumbs for these items (when items are opened) are most of the time displaying the wrong category, sometimes the right one. The theme seems to “guess” the parent category, randomly pick one portfolio category, but not even consistently. It is a real pain.

    The pages cannot have a parent set, as they are independent pages in the menu.
    So yes, the page hierarchy is correct, they are set to “no parent”.

    https://kriesi.at/support/topic/breadcrumbs-according-to-session/
    is not applicable because it states that it would only work for one page.

    No, I cannot use the “fix” mentioned in some posts, by adding this to functions.php:

    add_action('after_setup_theme','avia_remove_portfolio_breadcrumb');
    
    function avia_remove_portfolio_breadcrumb(){
    remove_filter('avia_breadcrumbs_trail','avia_modify_breadcrumb');
    }

    because that has some nasty side effects, like for instance auto-enabling pagination even if that portfolio category page (portfolio grid) is set to display ALL items and NOT use pagination.

    Added Note:
    You can ONLY see this when NOT logged in as admin, but as normal user.
    While this code fixes the APPEARANCE of the breadcrumbs, now clicking on the breadcrumb category then sends you to an archive page
    with URL
    /first-category/other-category/
    which has breadcrumb
    Home/first-category/other-category/
    which is totally wrong, as both categories are equal level…

    This issue with the portfolio category breadcrumbs dates from at least November 2013 as far as I could see…

    Any chance of a lasting fix that shows the correct category for the portfolio items in this rather basic setup?
    Thanks for looking into this.

    Cheers,
    Rob

    Added 2020-06-13: Additional info about the breadcrumbs behaviour in the portfolio cats breadcrumbs:

    Through trial and error I have found how to circumvent the effect of the random portfolio category assignment in the breadcrumbs. Let me try to explain what happens:

    Each Portfolio Category has a Page with only that category showing in a Portfolio Grid.
    Under each entry in Portfolio-Cat1 I have a button with a link to an item in Portfolio-Cat2.

    If that link-to-Portfolio-Cat2-item is clicked (by a normal visitor) before the link in its actual Portfolio-Cat2 is clicked, then it seems to (incorrectly) store Portfolio-Cat1 as the parent for that Portfolio-Cat2 item. ????

    If however I manage to be the first visitor to open the Portfolio-Cat2 page and open all items there, then Portfolio-Cat2 is stored as the (correct!) parent for the Portfolio-Cat2 items in the breadcrumbs, and everything works as intended (with the help of W3 Total Cache which then serves up the stored ones).

    The only remaining issue is then that the buttons under Portfolio-Cat1 items (which link to a Portfolio-Cat2 item) then show this breadcrumb:
    Home-PortfolioCat1-itemCat2… Which is NOT as it should be, but something I can live with for now.

    Still, it is odd behaviour which you may want to take a look at and possibly fix.

    • This topic was modified 4 years, 6 months ago by rob2701. Reason: Additional info about the breadcrumbs behaviour added
    #1224316

    Hey Rob,
    Sorry for the late reply, in the thread that you linked to it is explained that “If you do not select a breadcrumb parent page a php session variable will be used to determine which page could be a parent page. The results may vary depending on which page the website visitor views first. If you want a constant breadcrumb (which does not use sessions to “guess” the right parent page based on previously visited pages) you need to select the breadcrumb parent manually.”
    When you explain your pages don’t have a parent page and the linking you have between the categories, this makes since when considering the php session variable.
    So it seems that the solution is to set the parent for these two pages, but I know that you didn’t want to do this because you wanted them to be independent pages in the menu, you can achieve this by using “custom links” for these two in the menu instead of the standard “menu items”.

    Best regards,
    Mike

    #1224386

    Hi Mike,

    No worries, I know you guys have a lot on your plate. Thanks for taking the time to look into this.

    You write: “If you want a constant breadcrumb (which does not use sessions to “guess” the right parent page based on previously visited pages) you need to select the breadcrumb parent manually.” How can I select the breadcrumb parent manually? I cannot find an option for that.

    The pages don’t have a parent page. They are independent portfolio categories. Not nested anywhere, no parent. So they can’t have a parent set even if I wanted to, simply because they don’t have one.

    Test with Home temporarily set as parent / custom menu links for Portfolio Cats
    If I select for example Home as the parent page (just for testing purposes) and then use custom links to replace the normal menu entries (both portfolio categories top level links in the menu), that just results in breadcrumbs like this:
    Opening CAT2-item from CAT2 Menu link: Home/Home/CAT2/CAT2-item
    Opening CAT2-item from button in CAT1-item: Home/Home/CAT1/CAT2-item

    Test with no page parent set / custom menu links for Portfolio Cats
    If I do not select a parent page for these two portfolio category pages (simply because they do not have a parent page), and set the menu items with custom links like you suggested, this results in the following breadcrumbs:
    Opening CAT1-item from CAT1 Menu link: Home/CAT1/CAT1-item
    Opening CAT2-item from CAT2 Menu link: Home/CAT2/CAT2-item
    Opening CAT2-item from button in CAT1-item: Home/CAT1/CAT2-item

    Conclusion:
    So unfortunately the conclusion is that the behaviour is not solved through custom menu links.
    The only difference that makes is that now the CAT2-items, when opened from the CAT2 page, actually retain the proper category (CAT2), whjere before they retained the CAT1 indefinitely when that link was visited first.
    But when opened through a link (button) from a CAT1-item they still show Home/CAT1/CAT2-item…

    For my understanding: can you explain why this is so difficult for the theme to determine? All portfolio items in both portfolio categories are properly assigned to only their own respective portfolio categories.
    Shouldn’t the theme be taking the breadcrumb category for each portfolio item from the assigned portfolio category for the items from the database?

    At the moment (because this is a simple site setup with only 2 portfolio categories of equal level) I can manage by doing a manual intervention. But you can imagine how this would quickly become unmanageable if there were lots of portfolio categories or even nested ones, then the need for manual intervention would quickly become a nightmare.

    Long story short: I hope the theme breadcrumbs should in some way be able to detect the proper portfolio parent category for each item and link to that, after all, they are there, assigned properly.

    I have included access to the dev site in private field if you want to try it out there.

    Thanks for your help,
    Rob

    #1224442

    Hi,
    Thank you for the login, so to correct the breadcrumbs for your portfolio items please note this option in the editor sidebar:
    2020-06-21_153841.png
    From your “T” page the second portfolio item is “J & W”, an item from the “T” category and as you said, from your “T” page the breadcrumbs on the portfolio item “J & W” is Home > T > J&W this is correct so far, now from “J & W” if you click the button to the sister page in the “I” category the breadcrumbs still show the “T” because we were in a “T” category item when we clicked the button.
    So what I did for the “I” category item that showed the wrong breadcrumbs was to set the breadcrumbs option above, now no matter how you land on the “I” category item the breadcrumbs will show “I”

    I believe you only need to set this option on the “I” category items because I don’t see any buttons on those items going to “T” items. As for your menu highlighting, this may correct itself if you go back to the standard menu items, otherwise we can change with css.

    Best regards,
    Mike

    #1224449

    Hi Mike,

    Absolutely brilliant! You have lifted a long time spine from my foot with this solution :-)
    I just tested it and it works perfectly, just as you described.

    I am a bit ashamed though, I thought I knew most all Enfold settings, yet I had always missed the Breadcrumbs Hierarchy one, for the simple and stupid reason that I had not checkmarked it in the Screen Options. :-(
    So thank you for enlightening me on that, guess I still learn something new every day. Brilliant work by the team by the way, being able to set that breadcrumb hierarchy solves a whole lot of issues for many people.
    So I publicly apologize for my earlier criticisms, as this was already solved (and brilliantly so), I just had never seen it.

    After going back to the nomal menu items (non-custom links) I have fixed the menu highlighting by just entering the new menu IDs in the Quick CSS.

    Again, thank you for your precious time and excellent help, much appreciated! And for pointing me to the Breadcrumbs Hierarchy solution. Issue is solved perfectly, so please close this whenever you want.

    Cheers and thanks,
    Rob

    #1224455

    Hi,
    Glad to hear this helped and thanks for the kind words. We will close this now, thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Wrong portfolio category displaying in breadcrumbs’ is closed to new replies.