WordPress.org

Ready to get started?Download WordPress

Forums

Need Help with Custom filer-Plugin (2 posts)

  1. Thief_PL
    Member
    Posted 2 years ago #

    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??

  2. Big Bagel
    Member
    Posted 2 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.