• Good evening, all!
    I’m a newbie to PHP and am having difficulties with making changes to the comments form. (I’m using the ‘bricks’ theme, if it makes a difference.)

    https://www.weidnernightlife.com
    My problem: People making comments have to enter name, email, url and comment. I’d like to remove the ‘URL’ entry and change it to ‘city’.

    Can anyone explain to me ‘HOW’ to go about doing that without causing ‘fatal errors’ all over my comments page?

    Any help and input would be IMMENSELY appreciated!

    Also… this is a project for my employer, and we’re hoping to get it launched within in two days. I realize folks here stay pretty darn busy, and I may not get this answered by then, but if it’s possible, I’d be forever grateful. :o)

Viewing 6 replies - 1 through 6 (of 6 total)
  • heh this would require editing of a few files. Comments.php, wp-comments-post.php, and comments-functions.php.

    comments-functions appears to be the most difficult php to change, although I’d think it’d be possible to create a new function call. Possibly something that recreates the name call.

    Thread Starter jberglund

    (@jberglund)

    I did try changing the ‘comments_author_url’ to ‘comments_author_city’ and going through EVERY file and every example of it and changing it. No matter WHERE I found it and what I changed (including the field in my database) I kept getting a ‘fatal error – failure to call function…’ notice on when I brought up the comments page.

    Maybe I just didn’t find all the locations of it, but, I went through all the files. If nothing else, I guess I’d be okay with just eliminating the URL altogether.

    My thing is, we’d like to have folks post comments and have a title above it say ‘Julie from Green Bay says…’

    You could just change the label on the URL entry to ‘City’ and then remember when you’re making new templates and stuff that whenever the tag mentions URL, it’s going to call a city for you.

    i don’t think just changing the label from URL to ‘City’ would work though because wordpress thinks that it’ll be a link that’s inserted there. So if you entered ‘New York City’, then WP would change it to https://new york city i think. You’d have to create a new field for city.

    Thread Starter jberglund

    (@jberglund)

    Yes. I did try changing the field, including changing it to a ‘text’ field. Still no go.

    Is there a way I can simply ADD a new field for ‘city’? Maybe keeping the ‘url’ one there also?

    Problem is, as I said, I’m VERY new to PHP. I still don’t know all the ins and outs. I’d really like to have this field added, though.

    You could add a new field, something similar to the “name” input field. But you’d also have to add it to 3 files, and as far as I can tell, it seems to be a good amount of php work, although my own php skills only get me by.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Changing the PHP for my comments’ is closed to new replies.