• 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 Member

    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 202

    Both of the lines are extract($args);

    Please could you help me get over the edge on this one?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter helpmeplease90

    (@helpmeplease90)

    /////// ++++ Update ++++ ////////

    I added (array) for the extract. Please see below.

    extract((array)$args);

    Now the errors have gone, which is great because I now have at least the search result markup displaying where I want it.

    You can visit the page to see for your self here http://bumble.marc-designs.com/search/?first_name=nathan&um_search=1

    BUT

    The divs and other elements that are used to hold the users profile image and cover photo are empty.

    <div class="um-members masonry" style="position: relative; height: 87px;">
    	<div class="um-gutter-sizer masonry-brick"></div>
    	<div class="um-member um-role-member approved  masonry-brick" style="position: absolute; left: 0px; top: 0px;">
    	   <span class="um-member-status approved">Approved</span>
    	   <div class="um-member-card no-photo"></div>
    	</div>
    	<div class="um-clear masonry-brick"></div>
    </div>

    As you can see that it has not grabbed the profile image or anything else for the person it has searched. But as you can see it at least knows that it is a “member” from the class it has been given class=”um-member um-role-member approved masonry-brick”.

    Could you please maybe give me a direction to head in or a full fix for this. If we can get this working, it would be a great feature for people to use.

    Kind Regards.

    What exactly did you put in the header.php file that would bring the UM search field onto the home page?

    Thread Starter helpmeplease90

    (@helpmeplease90)

    I put the short code of the search form I created in member directories.
    I used do_shortcode

    Place the entire code that you added to the header.php file here.

    @helpmeplease90

    Were you able to get a fix to the issue?

    This is a very important feature and I wonder why ultimate member plugin team have not implemented this feature into their plugin. We should have the option to show search result on a separate page.

    @helpmeplease90

    I found a way around it without creating template or coding anything. It’s pretty straight forward and does not need any coding.

    @justopec

    Would you mind sharing how you solved this problem? I’d like to have the search input in my menu nav so members could search the um member directory at all times, regardless of the page they are currently on. I don’t mind if the search results display on the built in um member page, but I do want to be able to search this directory without being on the member page. I currently have a search form in the nav but it doesn’t behave the way the filtering does with the um directory search.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Search Results on Page’ is closed to new replies.