WordPress.org

Ready to get started?Download WordPress

Forums

WORDPRESS VIDEO GALLERY
Paging does not work on Searh result (2 posts)

  1. hoa.buiduy
    Member
    Posted 9 months ago #

    Hi,
    When I search with key word ( >= 2 words)
    The search results have a problem when paging
    When I click to number of page.
    Key word in the address bar of browser was remove space between 2 words
    Please help me fix it.

    Thank all.

    http://wordpress.org/plugins/contus-video-gallery/

  2. karthikeyani
    Member
    Posted 9 months ago #

    Hi,

    Please open \wp-content\plugins\contus-video-gallery\front\views\videomore.php and find case 'search':. Here you can find the below code.

    $thumImageorder = "( t4.tags_name LIKE '%" . $this->_video_search . "%' || t1.description LIKE '%" . $this->_video_search . "%' || t1.name LIKE '%" . $this->_video_search . "%')";
                            $TypeSet = $this->_settingsData->feature;

    Please replace with the following code.

    $video_search   = str_replace("%20", " ", $video_search);
                            $searchname = explode(" ", $this->_video_search);
                            $likequery = '';
    
                            for ($i = 0; $i < count($searchname); $i++) {
                                $likequery.="( t4.tags_name LIKE '%" . $searchname[$i] . "%' || t1.description LIKE '%" . $searchname[$i] . "%' || t1.name LIKE '%" . $searchname[$i] . "%')";
                                if (($i + 1) != count($searchname)) {
                                    $likequery.=" OR ";
                                }
                            }
                            $thumImageorder = $likequery;

    Now find $arr_params = array ( 'pagenum' => '%#%', 'video_search' => $video_search ); and place the following code above the line.

    $video_search = str_replace(" ", "%20", $video_search);
    Eg :

    $video_search   = str_replace(" ", "%20", $video_search);
                $arr_params     = array ( 'pagenum' => '%#%', 'video_search' => $video_search );

    If you are still facing any issue in this, feel free to contact us.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.