search not working after update to 2.6

Home Forums Legacy Support Support queries Update Issues search not working after update to 2.6

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #97231
    chinolz
    Spectator
    https://hakin9.org/ search not working and miss aligned after update to 2.6
    #97236
    chinolz
    Spectator
    i found out you guys updated the header files. i replaced them and its fine now. One question, where did you locate the search form, i cant find it? i need to customize the search, to only search "course" "wpdmpro" "post" in the old header the code would be something like this: <div id="searchdiv"> <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> <div><label class="screen-reader-text" for="s">Search for:</label> <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Hit enter to search...','vibe'); ?>" /> <input type="hidden" name="post_type[]" value="course" /> <input type="hidden" name="post_type[]" value="wpdmpro" /> <input type="hidden" name="post_type[]" value="post" />
    #97275
    Anshuman Sahu
    Keymaster
    Yup this is an issue of now due to modification in search . Update releasing for this today . You would need to update wplms theme and also wplms one instructor theme .
    #97276
    Anshuman Sahu
    Keymaster
    But this issue appears only with child themes which are modifying header.php file . can you please share your site url and admin credentials in a private reply to check this at your end . PS : mark reply as private while sharing .
    #97332
    chinolz
    Spectator
    As i mentioned i managed to resolve the issue, My question is now how can i limit search results to the following? <input type="hidden" name="post_type[]" value="course" /> <input type="hidden" name="post_type[]" value="wpdmpro" /> <input type="hidden" name="post_type[]" value="post" /> where can i modify the search form?
    #97460
    Anshuman Sahu
    Keymaster
    Here is how you can do this : basically you need to  remove the action for the search form and add it again to modify it . add_action('init','remove_search_modified_wplms'); function remove_search_modified_wplms(){   remove_action('wp_footer',array('WPLMS_Actions','search'));   add_action('wp_footer','add_modified_search_wplms'); } function add_modified_search_wplms(){ //custom modified search form here      ?>         <div id="searchdiv">             <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">             <input type="hidden" name="post_type[]" value="course" />             <input type="hidden" name="post_type[]" value="wpdmpro" />             <input type="hidden" name="post_type[]" value="post" />                 <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Hit enter to search...','vibe'); ?>" />                 <?php                      $course_search=vibe_get_option('course_search');                     if(isset($course_search) && $course_search)                         echo '<input type="hidden" value="course" name="post_type" />';                 ?>             </form>             <span></span>         </div>     <?php   } Note that it is upto you how to handle this search on search.php or search-incourse.php file .
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘search not working after update to 2.6’ is closed to new replies.