Good afternoon,
Thank you for the great theme.
When I search anywhere on my website using the search bar it doesn't search the resources that I have added or the tags that are on the resources. It only searches "pages" and "courses". How can I change the search so that it queries my whole website?
Sincerely,
- BM
Hi,
will you please tell us the things you want to become search able.
It will be great if you tell us the required things.
This reply has been marked as private.
Hi,
Is your all units are free ?
The units and unit contents are paid thats why we avoid to make them searchable to avoid unwanted access on them.
This reply has been marked as private.
This reply has been marked as private.
This reply has been marked as private.
Well the code i have sent to you is working well on our test site. Please check if you are missing any syntax( ; or }) in the code. Please download the code from here :
https://ufile.io/bxkot copy the code from this file and paste in wplms-customizer.php file.
This reply has been marked as private.
remove previous code and add this one :
add_filter( 'register_post_type_args',function($args, $post_type){
if($post_type == 'unit'){
$args['exclude_from_search'] = false;
}
return $args;
},10,2);
Perfect thank you! That worked well. For anyone else looking the code was:
add_filter( 'register_post_type_args',function($args, $post_type){
if($post_type == 'unit'){
$args['exclude_from_search'] = false;
}
return $args;
},10,2);
The code that worked, for others looking, was the following snippet added to wp-content/plugins/wplms-customizer/wplms-customizer.php:
add_filter( 'register_post_type_args',function($args, $post_type){
if($post_type == 'unit'){
$args['exclude_from_search'] = false;
}
return $args;
},10,2);
This reply has been marked as private.
Well if you added this code in wplms customizer pluign then there is not need to worry .
Wplms customizer never gets update ,so your code is safe and it wont be overwritten