WordPress.org

Forums

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

  1. RiseOfLex88
    Member
    Posted 1 year 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 1 year ago #

    Hmm, anyone?

  3. TCBarrett
    Member
    Posted 1 year 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 1 year ago #

    Bloomin marvellous, thanks badger!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic