removing pagination from the search results
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 14 Feb 2018 13:35:57 +0000 (08:35 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 14 Feb 2018 13:35:57 +0000 (08:35 -0500)
removing pagination for members list from the search results page

glm-member-db-events/views/front/events/agenda.html
glm-member-db/views/front/members/list.html
inc/custom.php

index 6b27033..5c907bc 100644 (file)
@@ -4,7 +4,6 @@
             {if $eventsByDate}
                 <hr>
                 <h1>Related Events for: {$smarty.request.s}</h1>
-                {apply_filters("is_page", "search")}
             {/if}
         {else}
             {include file='front/events/searchForm.html'}
index d271acf..19bd844 100644 (file)
  <!-- Member information displayed in list -->
 
 <div class="glm-member-list-listing-container">
-{if $settings.list_show_search_alpha}
+{if $settings.list_show_search_alpha && !apply_filters("is_page", 'search')}
     <div class="glm-alpha-links">
         <a href="{$thisUrl}?glm_action=list&textSearch={$textSearch}{if $smarty.request.s}&s={$textSearch}{/if}&categorySearch={$catSearchSelected}&regionSearch={$regionSearchSelected}" class="glm-alpha-link{if !$alphaSelected} glm-alpha-link-selected{/if}">All</a>
   {foreach $alphaList as $a}
    </div>
 {/if}
 
-{if $paging}
+{if $paging && !apply_filters("is_page", 'search')}
     <br>
     <a href="{$thisUrl}?glm_action=list&textSearch={$textSearch}{if $smarty.request.s}&s={$textSearch}{/if}&categorySearch={$catSearchSelected}&regionSearch={$regionSearchSelected}&pageSelect=Previous&prevStart={$prevStart}&nextStart={$nextStart}&limit={$limit}&alpha={$alphaSelected}" class="glm-alpha-link" {if !$prevStart} style="pointer-events: none; opacity: 0.5;"{/if}>Previous page</a>
     <a href="{$thisUrl}?glm_action=list&textSearch={$textSearch}{if $smarty.request.s}&s={$textSearch}{/if}&categorySearch={$catSearchSelected}&regionSearch={$regionSearchSelected}&pageSelect=Next&prevStart={$prevStart}&nextStart={$nextStart}&limit={$limit}&alpha={$alphaSelected}" class="glm-alpha-link" {if !$nextStart} style="pointer-events: none; opacity: 0.5;"{/if}>Next page</a>
 
 {/if} {*end grid view check*}
 
-{if $paging}
+{if $paging && !apply_filters("is_page", 'search')}
     <br>
     <a href="{$thisUrl}?glm_action=list&textSearch={$textSearch}{if $smarty.request.s}&s={$textSearch}{/if}&categorySearch={$catSearchSelected}&regionSearch={$regionSearchSelected}&pageSelect=Previous&prevStart={$prevStart}&nextStart={$nextStart}&limit={$limit}&alpha={$alphaSelected}" class="glm-alpha-link" {if !$prevStart} style="pointer-events: none; opacity: 0.5;"{/if}>Previous page</a>
     <a href="{$thisUrl}?glm_action=list&textSearch={$textSearch}{if $smarty.request.s}&s={$textSearch}{/if}&categorySearch={$catSearchSelected}&regionSearch={$regionSearchSelected}&pageSelect=Next&prevStart={$prevStart}&nextStart={$nextStart}&limit={$limit}&alpha={$alphaSelected}" class="glm-alpha-link" {if !$nextStart} style="pointer-events: none; opacity: 0.5;"{/if}>Next page</a>
index d034c46..7e3269e 100644 (file)
@@ -128,13 +128,17 @@ function display_memberfindme_directory() {
        // Show MemberFindMe shortcode from Directory page
     $_REQUEST['textSearch'] = $_REQUEST['s'];
     $_REQUEST['action'] = 'list';
-    $_REQUEST['event_name'] = $_REQUEST['s'];
-       $my_postid = 30722;//This is page id or post id
-       $content_post = get_post($my_postid);
-       $content = $content_post->post_content;
-       $content = apply_filters('the_content', $content);
-       $content = str_replace(']]>', ']]&gt;', $content);
-       echo $content;
+       $_REQUEST['event_name'] = $_REQUEST['s'];
+       echo do_shortcode('[glm-members-list view="grid" ]');
+       if( isset($_REQUEST['textSearch']) ){
+               echo do_shortcode('[glm-members-event-list]'); 
+       } 
+       // $my_postid = 30722;//This is page id or post id
+       // $content_post = get_post($my_postid);
+       // $content = $content_post->post_content;
+       // $content = apply_filters('the_content', $content);
+       // $content = str_replace(']]>', ']]&gt;', $content);
+       // echo $content;
 }
 
 // Custom User Profile settings - Hide bunch of stuff