WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
[resolved] Removing P2P Widget? (4 posts)

  1. riseoflex88
    Member
    Posted 5 months ago #

    Trying to disable the P2P widget, with wp widgets I know you can use...

    unregister_widget( 'WP_Widget_Pages' );

    Does anyone know the ID of the widget which comes with the p2p plugin?

    I've tried looking in the code itself as well as taking random guesses, searched everywhere. Can someone point this out please?

    https://wordpress.org/plugins/posts-to-posts/

  2. riseoflex88
    Member
    Posted 5 months ago #

    Hmm, anyone?

  3. TCBarrett
    Member
    Posted 5 months ago #

    Try removing the widget later in the stack:

    add_action( 'widgets_init', 'tcb_unregister_p2p_widget', 99 );
    function tcb_unregister_p2p_widget() {
      unregister_widget( 'P2P_Widget' );
    }
  4. riseoflex88
    Member
    Posted 5 months ago #

    Bloomin marvellous, thanks badger!

Reply

You must log in to post.

About this Plugin

About this Topic