-
Author
-
June 14, 2016 at 20:53 #125606
maarten
ParticipantHi,
I am trying to remove post meta from all our LearnDash course pages. I’d like to accomplish this with the functions.php and found the code below for Genesis frameworks. I am not sure how Kleo defines the post meta. Can you help me out so I can replace the Genesis-specific references in the actions?
Thanks!
<?php // Remove Post Info, Post Meta from CPT function wpb_remove_post_info() { if (‘sfwd-courses‘ || ‘sfwd-lessons‘ || ‘sfwd-quiz‘ || ‘sfwd-certificates‘ == get_post_type()) { remove_action( ‘genesis_entry_header‘, ‘genesis_post_info‘, 12 ); remove_action( ‘genesis_entry_footer‘, ‘genesis_post_meta‘ ); } } add_action ( ‘genesis_before_entry‘, ‘wpb_remove_post_info‘ ); From:
https://wpbeaches.com/remove-post-info-and-meta-in-learn-dash-custom-post-types/
June 16, 2016 at 23:44 #125840Abe
KeymasterHi there, until next version please replace this file where I added an extra filter. The file from the zip should be replace in the theme under "/lib" folder. After doing that you can add this snippet to your child them functions.phpadd_filter('kleo_postmeta_enabled','kleo_my_meta_changes'); function kleo_my_meta_changes( $meta_status ) { if ( 'sfwd-certificates' == get_post_type()) { return 0; // zero disables it, 1 enables it } return $meta_status; } -
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘General questions’ is closed to new topics and replies.