Aurangajeb

Add custom Post Form on the My Account Page

Jul 24th, 2021 (edited)
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Add custom Post Form on the My Account Page (https://prnt.sc/1faf4zy) */
  2. // filter/hook to modify WPUF Account page's tab/section
  3. add_filter('wpuf_account_sections',function ($sections){
  4.     $sections['event-form'] = 'Event Form'; // add new tab Event FOrm on the Account page
  5.     return $sections;
  6. },999);
  7.  
  8. // add custom form on the WPUF Account page's tab/section
  9. add_action( 'wpuf_account_content_event-form', 'wpuf_my_event_form_section', 10, 3 );
  10. function wpuf_my_event_form_section( $sections, $current_section ) {
  11.     echo do_shortcode('[wpuf_form id="814"]'); //insert your post form shortcode here
  12. }
RAW Paste Data