WordPress.org

Support

Support » Plugins and Hacks » Hacks » Need Help with Custom filer-Plugin

Need Help with Custom filer-Plugin

  • Thief_PL

    @thief_pl

    Hello recently i have found a hack that allowed me to remove the website field from the comment box.

    Here is the plugin:

    <?php
    /*
    Plugin Name: WordPress MOD
    */
    add_filter(‘comment_form_default_fields’, ‘url_filtered’);
    function url_filtered($fields)
    {
    if(isset($fields[‘url’]))
    unset($fields[‘url’]);
    return $fields;
    }
    ?>

    and now is there any way i could use the similar code to remove the comment box from pages only (but i want to have it on the posts) without modifing the source code of WordPress??

Viewing 1 replies (of 1 total)
  • Big Bagel

    @big-bagel

    You could just turn off comments on any post/page you don’t want them on. It’s an option in the “Discussion” meta box when editing pages/posts.

    Or are you looking to get rid of just the comment box while leaving the name and email boxes?

Viewing 1 replies (of 1 total)
  • The topic ‘Need Help with Custom filer-Plugin’ is closed to new replies.
Skip to toolbar