make header search , search on course directory

please add this given code in your wplms-customizer.php file in wplms customizer plugin :

add_action('init',function(){
  $actions = WPLMS_Actions::init();
  remove_action('wp_footer',array($actions,'search'));
});
add_action('wp_footer','dir_cc_search');
function dir_cc_search(){
  $pages = get_option('bp-pages');
  $course_dir = isset($pages['course'])?$pages['course']:0;
  if(function_exists('icl_object_id')){
    $course_dir = icl_object_id($course_dir, 'page', true);
  }
  ?>
      <div id="searchdiv">
          <form role="search" method="get" id="searchform" action="<?php echo get_permalink($course_dir); ?>">
              <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Hit enter to search...','vibe'); ?>" />
              
          </form>
          <span></span>
      </div>
  <?php
}

 

Was this article helpful?

Related Articles

Leave A Comment?