• Resolved wakabayashi0827

    (@wakabayashi0827)


    I sometimes get mails that asks to moderate trackbacks to pages, not to posts.
    Trackbacks to posts are disabled with “Settings -> Discussion” settings.
    I want to disable trackbacks to pages as well, but there seems to be no setting in WordPress.
    Is it possible to disable trackbacks to pages with this plugin?

Viewing 1 replies (of 1 total)
  • Plugin Support Abid Hasan

    (@abidhasan112)

    Hi @wakabayashi0827,

    Actually, In the default WordPress settings s there are no options to disable trackbacks. This is available only for Posts. But I can help you to do this by using custom code.

    // Function to disable trackbacks for post types
    function disable_trackbacks_for_post_types() {
    	foreach ( get_post_types() as $post_type ) {
    		if ( post_type_supports( $post_type, 'trackbacks' ) ) {
    			remove_post_type_support( $post_type, 'trackbacks' );
    		}
    	}
    }
    
    // Add action to call the function on WordPress initialization
    add_action( 'init', 'disable_trackbacks_for_post_types' );

    Add this code to your child-theme’s?functions.php?file or use a custom plugin. It will globally disable trackbacks for all post types, including pages. Test it in a safe environment before applying it to your live site. Let me know if you have any further questions.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Can this plugin disable trackbacks to pages?’ is closed to new replies.