Comments amiir started the conversationAugust 28, 2022 at 12:27pmHello, I want to create a search box using Elementor or any other methodSearches only in unitsis that possibleIs it possible to add filters attached to the search, such as the courses filter attached to the search that already exists[deleted] repliedAugust 29, 2022 at 3:51pmWell units are not searchable while the courses are searchable . you can choose to search only courses by enabling wp-admin -> wplms -> header -> Navigation Search -> course search.amiir repliedAugust 29, 2022 at 5:00pmCan you develop a method for searching for units? Only some users do not need a full course, only part of it is needed[deleted] repliedAugust 30, 2022 at 1:16pmWe can enable searching of units . add this code in your wplms-customizer.php file in wplms customizer plugin : function change_post_types_slug( $args, $post_type ) { if ( 'unit' === $post_type ) { $args['exclude_from_search'] = false; } return $args;}add_filter( 'register_post_type_args', 'change_post_types_slug', 10, 2 );amiir repliedAugust 30, 2022 at 2:29pmCan you show me a picture of where to put this code?Thank you[deleted] repliedSeptember 1, 2022 at 1:41pmhttps://wplms.io/support/knowledge-base/how-to-use-coding-tips/you will need this wplms customizer plugin which is attached . Sign in to reply ...
Hello, I want to create a search box using Elementor or any other method
Searches only in units
is that possible
Is it possible to add filters attached to the search, such as the courses filter attached to the search that already exists
Well units are not searchable while the courses are searchable .
you can choose to search only courses by enabling wp-admin -> wplms -> header ->
Navigation Search -> course search.
Can you develop a method for searching for units? Only some users do not need a full course, only part of it is needed
We can enable searching of units .
add this code in your wplms-customizer.php file in wplms customizer plugin :
function change_post_types_slug( $args, $post_type ) {
if ( 'unit' === $post_type ) {
$args['exclude_from_search'] = false;
}
return $args;
}
add_filter( 'register_post_type_args', 'change_post_types_slug', 10, 2 );
Can you show me a picture of where to put this code?
Thank you
https://wplms.io/support/knowledge-base/how-to-use-coding-tips/
you will need this wplms customizer plugin which is attached .