Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)
  • Thread Starter yann1ck

    (@ja4st3r)

    Hi Sybre,

    thank you very much for your response and your example. Why are you not using the “the_seo_framework_breadcrumb_shortcode_output” filter? Thats what I played with before going with a CSS only solution. Perhaps it is helpful for someone else.

    .tsf-breadcrumb .breadcrumb-item:not(:nth-child(-n + 2)):last-of-type {
        display:none;
    }
    
    .tsf-breadcrumb .breadcrumb-item:not(:nth-child(-n + 1)):nth-last-of-type(2)::after {
        display:none;
    }
    Thread Starter yann1ck

    (@ja4st3r)

    Hi Lap,

    is that bug on the roadmap for a future version? I tried to fix it myself yesterday, playing around with the conditionality.js, but it is beyond my abilities πŸ˜€

    Kind Regards

    Yannick

    Thread Starter yann1ck

    (@ja4st3r)

    I just add a pull request for my suggestions.

    While doing that I saw that you accounted for the prefixes. I have missed that before

    • This reply was modified 3 years ago by yann1ck.
    Thread Starter yann1ck

    (@ja4st3r)

    Hi Phi,

    sorry that I did not give you more details. I dont like the prefixes and personally dont use them.

    By default WordPress adds prefixes to archive pages, e. g. “Archive” for custom post types or ‘Author’ for author archives or ‘Month’ for archives sorted by month. I think a user expects that these prefixes are “part” of the archive title and should be part of the breadcrumb trail as well.

    Example:
    I have a custom post type ‘book’ and list various kinds of books. I have a archive where I list all books, and the default title is ‘Archive: books’ (because it uses the prefix). One book is ‘The Hobbit’, so the breadcrumb trail would be ‘Home / book / The Hobbit’, but I think a user would expect ‘Home / Archive: book / The Hobbit’.

    I have not thought about taxonomy archives or any other kind of archive. I am not sure how to deal with prefixes for these. Furthermore I am not sure if there is a easy and performant way to access the prefix outsite of the loop.

    Regards
    Yannick

    Thread Starter yann1ck

    (@ja4st3r)

    Hi Phi,

    thank you for your fast response!

    I have on more suggestion. To get the name of an archive you use $post_type->labels->singular_name, but the singular name is not the same as the archive title. If I have an archive listing books there is an important difference in meaning between ‘books’ and ‘book’. So perhaps name would be better? (There is also the problem with prefixes, but I think there is no easy solution for it.

    Is there a Github repo? I can write a pull request for both suggestions.

    Kind regards
    Yannick

    Thread Starter yann1ck

    (@ja4st3r)

    Hi Phi,

    thank you very much for the update! I already tested it and it works great. I have one minor suggestion: The editor preview doesnt change, so it still shows “Dummy title”.

    I was just looking at the JSON-LD Breadcrumb Schema of you plugin and I think I found a bug. I am using https://validator.schema.org/ to check the schema and get no warning, but the ‘@type’ looks off. I should be something like ListItem or BreadcrumbList, but in my testing it is https://example.org/BreadcrumbList.