Forums › Forums › Search & Filter Pro › where to find php code for form
- This topic has 7 replies, 2 voices, and was last updated 8 years, 8 months ago by Ross.
-
Ross Moderator(Private) February 29, 2016 at 10:32 am #38227
Hey Jennifer
What are you trying to insert into the form?
I generally wouldn’t recommend modifying teh plugin directly as you will lose your modifications on updates.
That being said, if you must modify, then the displaying of the form is done over multiple files/classes.
The main file to display the form is:
search-filter-pro/public/includes/class-search-filter-display-shortcode.php
which display the main part of the form.Then, for every field that is shown, there is another class
search-filter-pro/public/includes/class-search-filter-generate-input.php
Hope that helps.
Thanks
Anonymous(Private) March 4, 2016 at 6:31 am #38682hi,
no I am not trying to modify anything. What I mean is that I want to put the search in a place with a background image. Instead of putting a short code, I want to put php. for example, in formidable form, a short code like [frm id=14] can be also
<?php echo FrmFormsController::get_form_shortcode( array( ‘id’ => 14, ‘title’ => false, ‘description’ => false ) ); ?>Whether I put short code or php, it’s the same.
Ross Moderator(Private) March 7, 2016 at 10:19 am #38805Hey Jennifer
Then in this case you can do:
<?php do_shortcode("[searchandfilter id='1']"); ?>
🙂
Anonymous(Private) March 14, 2016 at 9:02 am #39352this php doesn’t work. I put it in homepage: http://www.legalpenguin.com. nothing shows up.
i put it here and it’s there: https://www.legalpenguin.com/searchtest/
Ross Moderator(Private) March 14, 2016 at 2:10 pm #39385Hi Jennifer
Then I think it sounds like you are not positioning the shortcode in the correct place on your homepage.
There should be absolutely no reason a shortcode like this should work in one place, and not another. Try other shortodes on your homepage and try to find the cause of the issue.
Thanks
Anonymous(Private) March 15, 2016 at 1:47 am #39418the searchtest page shows because I simply put shortcode, not php. I inserted shortcode in the wpadmin ‘page’.
the homepage doesnot show because I put <?php do_shortcode(“[searchandfilter id=’1′]”); ?> in front-page.php insetad of put shortcode in ‘page’ in wp-admin.
if i put a php from formidable form like <?php echo FrmFormsController::get_form_shortcode( array( ‘id’ => 14, ‘title’ => false, ‘description’ => false ) ); ?>, it does shows ok.
So my question is “is the php code correct?”
Ross Moderator(Private) March 15, 2016 at 9:03 am #39426Hey Jennifer
Can you test that you are actually placing it in the correct place in your template – by putting in some plain text where it should be, and making sure this is displaying in the correct location?
Also, sorry to ask, but are you updating the
1
in the shortcode to reflect the ID you require?<?php do_shortcode("[searchandfilter id='1']"); ?>
Thanks
-
AuthorPosts