Woocommerce breadcrumb doesn’t show primary category

#88015
Viewing 5 replies - 16 through 20 (of 20 total)
  • George
    Rank Math free

    Hello.

    Thank you for the reply. When you say “to load the font file” what do you mean ? I’ve contacted my theme provider and he said me that the fonts were already loaded.

    He also told me “Just use classe <i class=”rhicon rhi-home”>.

    What I don’t understand is that this class is already present in my functions.php file

    /**
     * Filter to change breadcrumb html.
     *
     * @param  html  $html Breadcrumb html.
     * @param  array $crumbs Breadcrumb items
     * @param  class $class Breadcrumb class
     * @return html  $html.
     */
    add_filter( 'rank_math/frontend/breadcrumb/html', function( $html, $crumbs, $class ) {
           $customHTML = '<a href="https://www.bon-cafe.net/"><i class="rhicon rhi-home"></i></a>';
              $html[0] = $customHTML;
        	return $html;
        }, 10, 3);

    Hello,

    If the font icon files are loading fine, then the code you shared is correct and should help you insert an icon as a prefix on the breadcrumbs.

    Hope that helps.

    George
    Rank Math free

    Hello Uzair,

    Thank you for the fast reply.

    When you say “insert an icon as a prefix on the breadcrumbs” you mean that I have to go to Rank Math > General Settings > Breadcrumbs and in the field “Prefix Breadcrumb” put <i class=”rhicon rhi-home”> ?

    Can you tell me please what I have to put exactly ? here os the screenshot https://drive.google.com/file/d/1KWFxzl8hr4QWS1oeUY6qTK7MI6cB-Rhw/view?usp=drivesdk

    Many thanks

    Hello George,

    I am sorry but adding the html in the prefix filed will be added as text.

    The CSS provided previously by @Pratik seemed to have worked on your site. You can use the inspect element option on your browser and modify the CSS from your browser front end to see if can work on your front end. I wanted to look into this but the access provided only works for the browser verification but not WP access.

    Looking forward to helping you. Thank you.

    ​​​​​​

    George
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 16 through 20 (of 20 total)

The ticket ‘Woocommerce breadcrumb doesn’t show primary category’ is closed to new replies.