Okay
  Public Ticket #3113258
Search units
Closed

Comments

  • amiir started the conversation

    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

  • [deleted] replied

    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.

  • amiir replied

    Can you develop a method for searching for units? Only some users do not need a full course, only part of it is needed

  • [deleted] replied

    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 );



  • amiir replied

    Can you show me a picture of where to put this code?
    Thank you

  • [deleted] replied

    https://wplms.io/support/knowledge-base/how-to-use-coding-tips/

    you will need this wplms customizer plugin which is attached .