Jump to content


Photo

Noob php help (wordpress related)


  • Please log in to reply
5 replies to this topic

#1 jeremiah84

jeremiah84
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 July 2017 - 05:18 PM

If anyone is familiar with modifying php files in wordpress, I am in desperate need of your help. Here is my situation:

 

I've added some fields in the "create group" php file, beyond just the default "Group Name" and "Group Description" fields. The problem I have is that after the Group is created and I go to the "Manage" page of the Group, only what I've filled out for the "Group Name" and "Group Description" fields have been saved and carried over to that page; the other fields I've filled out are empty.

 

I know this is probably an extremely simple thing to do for a person well-versed in php, but I am by no means a programmer and would just like these simple additions for my page. I have been trying for the past week to get this straightened out, but nothing is working.

 

Please help me : .



#2 NotionCommotion

NotionCommotion
  • Members
  • PipPipPip
  • Advanced Member
  • 1,444 posts

Posted 22 July 2017 - 11:26 PM

Only there are some wordpress people on this forum, you probably not going to get any help on this question as it is.  To help, someone needs to browse all the wordpress script to figure out what you are asking. If you identify the specific relevant sections of the PHP script, and just post that, you are more likely to get help.


NotionCommotion

#3 maxxd

maxxd
  • Members
  • PipPipPip
  • Advanced Member
  • 733 posts
  • LocationNorth Carolina

Posted 23 July 2017 - 02:23 PM

"Groups" is not a basic WordPress function. What plugins have you installed?



#4 jeremiah84

jeremiah84
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 23 July 2017 - 03:29 PM

"Groups" is not a basic WordPress function. What plugins have you installed?

Sorry, should've clarified that. The Buddypress plugin.



#5 jeremiah84

jeremiah84
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 23 July 2017 - 03:33 PM

Sorry, should've clarified that. The Buddypress plugin.

To expand on that....If you or anyone is familiar with the buddypress plugin, I guess my main (and very broad) question is which files would I have to modify if I want to add a field similar to the "Group Name" and "Group Description"?



#6 maxxd

maxxd
  • Members
  • PipPipPip
  • Advanced Member
  • 733 posts
  • LocationNorth Carolina

Posted 24 July 2017 - 11:54 AM

I don't know Buddypress, but you don't want to modify any of the plugin's files directly. Any changes you make will get overwritten when the plugin updates. You need to look for hooks (actions or filters) that fire right around where you want to add your fields and use those in your theme's functions.php file. You'll also have to hook into the save_post action to actually save the data.

 

Your best bet is to start with the documentation: https://codex.buddyp....org/plugindev/ or https://codex.buddyp....org/developer/.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users