• Resolved Stephanie O’Hanley

    (@stephanieohanley)


    Hi, I saw your advice about changing the block markup. I don’t want to change the entire block or rebuild it entirely. I would like to either replace the default separator with a double chevron icon or add the double chevron as an option for the separator.

    I was playing with block filters, but I seem to be doing something wrong. Any advice? The block is perfect except for the separator, which does not match the design of the theme I’m rebuilding.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Phi Phan

    (@mr2p)

    Hi Stephanie @stephanieohanley,

    I’ve just released a new version to add a new hook named breadcrumb_block_get_args. You now can change the separator as follows:

    add_filter( 'breadcrumb_block_get_args', function ( $args ) {
      // For example, change separator.
      $args['separator'] = '<svg xmlns="https://www.w3.org/2000/svg" fill="currentColor" width="1em" height="1em" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M3.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L9.293 8 3.646 2.354a.5.5 0 0 1 0-.708z"/><path fill-rule="evenodd" d="M7.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L13.293 8 7.646 2.354a.5.5 0 0 1 0-.708z"/></svg>';
      return $args;
    } );

    Regards, Phi.

    Thread Starter Stephanie O’Hanley

    (@stephanieohanley)

    Hi Phi,

    That is amazing!

    Thank you so much!

    -Stephanie

    Plugin Author Phi Phan

    (@mr2p)

    @stephanieohanley You’re welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change separator icon’ is closed to new replies.