Results 1 to 1 of 1

Thread: No Comments and Email for particular user

  1. #1
    Thread Starter
    Senior Member
    Not a Verified Customer
    chanders's Avatar
    Join Date
    Jul 2009
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No Comments and Email for particular user

    If you have a particular user 'SomeUser', who you would like to disable email and comments for (In case you just want calls on your mobile only) insert this into single.php close to the top, and keep in mind that you should not be messing core files because when an update comes your hacks will be undone. ( So write them down somewhere )

    Code:
    		<?php 
    				if (get_the_author_meta(user_login) == 'SomeUser')
    					{
                                   		update_option('email_form','no');
    					update_option('default_comment_status','closed');
    					}
    				else
    					{
    					update_option('email_form','yes');
    					update_option('default_comment_status','open');
    					}
    			} else { 
    				echo get_post_meta($post->ID, "name", true); 
    			} ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Allowing comments on ads
    By sarge in forum ClassiPress General Discussion
    Replies: 1
    Last Post: July 18th, 2009, 06:53 PM