Forum Replies Created

Viewing 4 replies - 31 through 34 (of 34 total)
  • Thread Starter buzut

    (@buzut)

    Thank you for your prompt answer.
    Sure, I had previously asked weather the feature was available in Yoast SEO.
    Then the ticket was closed 😢

    I was trying wpseo_breadcrumb_links on WooCommerce product pages because it’s actually a child (at least I think so): Home > All products > product.

    But can’t have it work. It seems like it’s never called.
    Sure I know filters must return something, but a var_dump is always printed nonetheless.

    I’ve have wpseo_breadcrumb_links a try as you suggest, but I don’t get its return value:

    
    array(3) {
      [0]=>
      array(3) {
        ["text"]=>
        string(7) "Accueil"
        ["url"]=>
        string(17) "http://localhost/"
        ["allow_html"]=>
        bool(true)
      }
      [1]=>
      array(1) {
        ["ptarchive"]=>
        string(7) "product"
      }
      [2]=>
      array(1) {
        ["id"]=>
        int(68)
      }
    }
    

    Here if [1] had the same value as [0] I’d be able to filter it properly and replace text and link to end up with what I need. But unless there is something I’m missing, I don’t really know how I can use this filter to achieve the task at hand : which is modifying the page’s immediate anscestor in the breadcrumb.

    Thank you for your patience 🙈

    Thread Starter buzut

    (@buzut)

    Any take on this?

    Thanking you in advance 🙌

    Thread Starter buzut

    (@buzut)

    Hi!

    Sorry, I hadn’t seen your answer. Notification went to the spambox.

    I tried the wp_seo_get_bc_ancestors but it doesn’t seem to work.

    
    // functions.php
    
    function breadcrumb_ancestors($arr) {
        var_dump($arr);
    }
    
    add_filter('wp_seo_get_bc_ancestors', 'breadcrumb_ancestors', 10, 1);
    

    Nothing happens, so unless I’ve got something wrong, the filter does nothing.

    • This reply was modified 6 years, 5 months ago by buzut.
    • This reply was modified 6 years, 5 months ago by buzut.

    +1 here, I’d love to have my ACF syntax colored!!!

Viewing 4 replies - 31 through 34 (of 34 total)