-
Author
-
January 27, 2016 at 15:32 #100741
clyn
Participanti can see the requiere membership metabox on add new post or page, how can add for specific custom post types. I check the lib/metabox.php but cant see there…
second; i want to hide post visibility and save draft so i found this code and working… This code can create any problem in the future
COPY CODEfunction wpse_36118_force_published( $post ) { if( 'trash' !== $post[ 'post_status' ] ) { /* We still want to use the trash */ if( in_array( $post[ 'post_type' ], array( 'page', 'my_custom_post_type' ) ) ) { $post['post_status'] = 'publish'; } return $post; } } // Hook to wp_insert_post_data add_filter( 'wp_insert_post_data', 'wpse_36118_force_published' );
January 27, 2016 at 15:50 #100747sharmstr
ModeratorSee this: http://www.paidmembershipspro.com/add-pmpro-membership-level-meta-box-to-a-custom-post-type/ Change the cpt name.
I cant read that code. Its up to you to figure out if its going to cause issues since it custom code.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
January 27, 2016 at 16:13 #100754clyn
Participantoh sorry
function wpse_36118_force_published( $post ) { if( ‘trash’ !== $post[ ‘post_status’ ] ) { /* We still want to use the trash */ if( in_array( $post[ ‘post_type’ ], array( ‘page’, ‘MYPOSTTYPES’ ) ) ) { $post[‘post_status’] = ‘publish’; } return $post; } } // Hook to wp_insert_post_data add_filter( ‘wp_insert_post_data’, ‘wpse_36118_force_published’ );
January 27, 2016 at 16:38 #100768clyn
ParticipantProM code working very well on my custom post type. Showing login or register buttons but login button goes to wp-login.php not open pop-up at same window, and register button go to register page and i dont want to use this page (i am using Promembership register page)
how can i change ths buttons URL’s
thanks
January 27, 2016 at 16:52 #100774sharmstr
ModeratorIn the PMPro settings (advanced). You can make anything launch the login modal by adding the kleo-show-login class to it. Its in the Kleo documentation.
Please read the documentation so you understand how to use PMPro. http://www.paidmembershipspro.com/documentation/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.