Search Results on Page
-
Hello.
I have been using your plugin for a little while now, and I’ve noticed that search results display underneath the search form.
I have also found a couple of threads in regards to trying to achieve search results rendering on a seperate page. https://wordpress.org/support/topic/ultimate-member-search-results-to-another-page/
The reason why I would want this is, I would like the search form in my header and the results to render on a seperate page. At the moment my search form in in the header but the results beneath the form and over the top of my content (which is what I do not want).
I have had a crack at it myself and I believe that I am somewhat close to doing this.
Essentially, I had created a custom page template and called it search.php. See below.
<?php /* Template Name: Search Results Page */ ?> <?php get_header(); ?> <div id="container"> <div id="content"> <?php do_action('um_members_directory_head', $args ); ?> <?php do_action('um_members_directory_display', $args ); ?> </div><!-- #content --> <?php get_sidebar(); ?> </div><!-- #container --> <?php get_footer(); ?>As you can see I added do_action for displaying the directory head and the directory display. I had found them inside members.php.
Then inside of the file um-actions-members.php I added
<?php echo get_page_link(308); ?>
for the form action. Which now looks like this.
<form method="get" action="<?php echo get_page_link(308); ?>" />Now it takes me to my new search page when I submit the form. But
It now returns an error.
Warning: extract() expects parameter 1 to be array, null given in /home/shaun3136/public_html/bumble/wp-content/plugins/ultimate-member/core/um-actions-members.php on line 95
1 MemberWarning: extract() expects parameter 1 to be array, null given in /home/shaun3136/public_html/bumble/wp-content/plugins/ultimate-member/core/um-actions-members.php on line 202
Both of the lines are
extract($args);Please could you help me get over the edge on this one?
The topic ‘Search Results on Page’ is closed to new replies.