Home › Forums › Front End PM PRO › Search button for Directory listing
Tagged: button, Directory, directory list, list, Search button
- This topic has 4 replies, 2 voices, and was last updated 7 years, 3 months ago by Andrew Perryman.
- AuthorPosts
- September 10, 2018 at 8:39 pm #17379Andrew PerrymanParticipant
Hi Shamim,
I know that, if I part type a name in the directory search field then press enter it will search and list those that match as per attached screen shot but our users will not know intuitively how to do this so is it possible to add a search button next to the search input field as per my attached picture (screenshot).
look forward to your thoughts on this for the next release?
Andrew
Attachments:You must be logged in to view attached files.September 10, 2018 at 11:04 pm #17383Shamim HasanKeymasterYou can add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_directory_output', function( $output ){ $pos = strpos( $output, '<input type="hidden" name="feppage"' ); if ( $pos !== false ) { $output = substr_replace( $output, '<input type="submit" value="Search" />', $pos, 0 ); } return $output; });it may break in future.
OR you can override
directory.phptemplate to add that button. Instruction to override template in https://sp-test1.arogga.co/docs/front-end-pm-pro/customization-front-end-pm-pro/change-templates/September 11, 2018 at 4:06 am #17391Andrew PerrymanParticipantMorning Shamim,
I decided to take a cleaner approach, so I created a directory “front-end-pm” in the root of my child theme as directed per your instructions and placed a copy of the Directory.php in it.
I placed this entry..
<input type="submit" value="Find" />
as the last entry in the <form> tag structure as per the attached screenshot, in the directory.php.Will this mean it is less likely to break in the future, are there plans to change the code structure for the directory.php file?
If so I can wait or just keep an eye out for for the changes and remove the bypass after your update if there is to be a change?
Kind regards..
Andrew
Attachments:You must be logged in to view attached files.September 11, 2018 at 9:53 am #17395Shamim HasanKeymasteroverriding template works as follows
If in future any template is modified in this plugin and you already overridden that template in your child theme then your template will be used instead of this plugins one. So if any new option or anything added in this template that you will not get until you add that in your template manually.Currently no plan to change in directory.php but you should keep an eye when update this plugin in future. Most of the time any template change is mentioned in changelog. If is better always read changelog before update (for any plugin)
September 11, 2018 at 2:31 pm #17401Andrew PerrymanParticipantThanks Shamim,
I will keep an eye on the update change log as you suggest.
Topic marked as resolved..
Andrew.
- AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.