I need help blocking content – custom posts paid memebrship pro / Sensei lms [closed]

Question

Please I need help!
I installed in my wordpress the plugin “Paid memebership pro” includes in the functions.php of my child theme the following code to include the option to choose by association in a personalized post page. This is going well

    function my_add_pmpro_meta_box_to_cpts() {
  // Duplicate this row for each CPT. This one adds the meta boxes to 'product' CPTs.
  add_meta_box('pmpro_page_meta', 'Require Membership', 'pmpro_page_meta', 'course', 'side' );


}
add_action( 'admin_menu', 'my_add_pmpro_meta_box_to_cpts', 20 );```

However, on the page of the courses that were indicated for association, all the content is appearing together with the association message, there is no blocking of the content. It turns out that the association message is appearing in the html at

iv class=”pmpro_content_message”>This content is only for Plan A members.
Register

When the correct thing would appear as in the posts

This content is only for Plan A members.
Register
“`

On pages and posts it looks correct, but on personalized posts it does not, it is not blocking the content, as the message appears in the middle of the content. I tried using it by shortcode but not later because each course will have a different association and the course file is single_course.

I use the lms sensei for courses.

0
Jessica Silva 3 years 2020-04-07T12:51:54-05:00 0 Answers 82 views 0

Leave an answer

Browse
Browse