• How I disable Pingback?
    remove_action( 'wp_head', 'wp_bootstrap_starter_pingback_header' );
    doesn’t seem to work.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try to set priority to 1.

    Thread Starter hupe13

    (@hupe13)

    Does not work either. I also have tried the User Contributed Notes, but it doesn’t work.

    Ops, wrong suggestion. Priority of the remove_action must be the same of the add_action command.

    But…You cannot successfully remove the action before it has been added. So, if you’re executing remove_action before add_action, it doesn’t work.

    Are you working on the child theme of functions.php? Well, it is executed before extras.php

    Thread Starter hupe13

    (@hupe13)

    Of course I use a child theme.

    But…You cannot successfully remove the action before it has been added. So, if you’re executing remove_action before add_action, it doesn’t work.

    Solved:

    function remove_my_action() {
        remove_action( 'wp_head', 'wp_bootstrap_starter_pingback_header' );
    }
    add_action( 'after_setup_theme', 'remove_my_action' );
    Theme Author Afterimage Designs

    (@afterimagedesigns)

    Hi @hupe13 and @lllor,

    Apologies for the response delay it seems that the code above is not working, I’ve tried this to on my end.

    Thanks for supporting the theme.

    Regards,
    Afterimage Designs

    Thread Starter hupe13

    (@hupe13)

    Do you see in the source code of any page this line with my code?
    <link rel="pingback" href="https://mydomain.tld/link/xmlrpc.php">

    I set up a test site with a child theme and only this code in functions.php and it worked.

    Theme Author Afterimage Designs

    (@afterimagedesigns)

    Hi @hupe13,

    Apologies for that, I meant to say that it was working on my end though I’ve added a ‘not’ on my feedback.

    Thanks for supporting the theme.

    Regards,
    Afterimage Designs

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable pingback’ is closed to new replies.