GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Simple Wordpress How to Question (https://gfy.com/showthread.php?t=1122149)

nexcom28 09-26-2013 02:00 PM

Simple Wordpress How to Question
 
How can I remove the email field from the comments or email & url?

I tried deleting the code directly from comments.php but when a user tries to comment it brings up an error.

I think I just need to hide it but how, I have tried a few ways by adding code to my functions.php but they always result in a header error.

lonerunner 09-26-2013 02:37 PM

Dashboard > Settings > Discussions

There you can uncheck Comment author must fill out name and e-mail and you have other options about comments too

nexcom28 09-26-2013 02:41 PM

Quote:

Originally Posted by lonerunner (Post 19813767)
Dashboard > Settings > Discussions

There you can uncheck Comment author must fill out name and e-mail and you have other options about comments too

This is ok and I didn't know this was possible but all it does is stop the fields being mandatory.
I want to remove them altogether (or hide them).

lonerunner 09-26-2013 03:17 PM

Quote:

Originally Posted by nexcom28 (Post 19813776)
This is ok and I didn't know this was possible but all it does is stop the fields being mandatory.
I want to remove them altogether (or hide them).

Than once they are not mandatory find them in comments function, usually in comments.php and remove them, or use css to hide them.

nexcom28 09-26-2013 03:24 PM

If you read my post, I tried deleting the code but when a user tries to post a comment it generates an error.
I have tried a few options for hiding it, usually within the functions.php file. How do I hide it with CSS?

purecane 09-26-2013 07:27 PM

GitHub-Repo...plug in that disables all comments

Manfap 09-27-2013 01:01 AM

add this to your functions file


Code:

add_filter('comment_form_default_fields', 'email_filtered');
function email_filtered($fields)
{
if(isset($fields['url'],$fields['email']))
unset($fields['url'],$fields['email']);
  return $fields;
}



disable ?require email? in WP preferences aswell

nexcom28 09-27-2013 01:41 AM

This didn't do anything at all..

Quote:

Originally Posted by Manfap (Post 19814167)
add this to your functions file


Code:

add_filter('comment_form_default_fields', 'email_filtered');
function email_filtered($fields)
{
if(isset($fields['url'],$fields['email']))
unset($fields['url'],$fields['email']);
  return $fields;
}

disable ?require email? in WP preferences aswell

Sorry, I misunderstood what you wrote, this did actually work. Thanks :thumbsup

Quote:

Originally Posted by nexcom28 (Post 19813820)
If you read my post, I tried deleting the code but when a user tries to post a comment it generates an error.
I have tried a few options for hiding it, usually within the functions.php file. How do I hide it with CSS?


Manfap 09-27-2013 03:34 AM

Quote:

Originally Posted by nexcom28 (Post 19814178)
This didn't do anything at all..



Sorry, I misunderstood what you wrote, this did actually work. Thanks :thumbsup

np you're welcome.

CIVMatt 09-27-2013 06:21 AM

I wonder if there's a plugin to block .pl users from creating accounts.... assholes

nexcom28 09-27-2013 06:41 AM

Quote:

Originally Posted by CIVMatt (Post 19814341)
I wonder if there's a plugin to block .pl users from creating accounts.... assholes

Yeah, along with .cn and .ru

Manfap 09-27-2013 07:27 AM

Quote:

Originally Posted by CIVMatt (Post 19814341)
I wonder if there's a plugin to block .pl users from creating accounts.... assholes

Add to htaccess maybe? I´m not an Apache expert, but I think this should work.

limit the POST function to specific countries. The POST request method is used when the client needs to send data to the server as part of the request, such as when uploading a file or submitting a completed form so keep in mind this will affect all POST methods on your site.

Code:

#BLOCK_POLAND
<Limit POST>
order allow,deny
deny from 46.17.112.0/21
deny from 46.18.104.0/21
deny from 46.20.48.0/20
and so on....


allow from all
</Limit>
#COUNTRY_BLOCK_END

full code here https://dl.dropboxusercontent.com/u/.../blocklist.txt


All times are GMT -7. The time now is 06:58 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123