Home › Toolset Professional Support › [Resolved] Custom Search leads to another page!
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
Tagged: Views, Views plugin
This topic contains 14 replies, has 2 voices.
Last updated by Minesh 3 years, 7 months ago.
Assisted by: Minesh.
Why does the search on this page lead to another page?
hidden link
As far as we know, the target page is not defined in the search filter, is it?
Hello. Thank you for contacting the Toolset support.
I can not tell anything until I review and check how exactly the custom search view is setup.
Can you please share problem URL and access details so I can review the current setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Thank you for sharing access details but after login when I try to access the wp-admin, it redirect me back to the home page.
I could not able to access the wp-admin. Can you please grant me access and make sure I should be able to access the wp-admin.
Role was set improperly - sorry for that!
Same issue, still if I try to access the wp-admin after login, it redirect me to homepage.
Now it should really work. Beg your pardon.
Thanks now I can access the wp-admin.
After checking the plugins page, I found that you are using outdated Toolset plugins. We always recommend running your site with the latest stable release plugin version.
*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/
Can you please share bit more information where exactly you added the view form and search result using what page/post/content template?
Hi 🙂
The VIEW: hidden link - here you also see the content template.
The Page: hidden link
I know the view and content template.
I would like to know how you added the view search form on left side bar. From where you added the view search form?
Ah yeah, that might have been the mistake:
[wpv-form-view name="pflanzen-suche" target_id="68727"]
Target_id should be the ID of the target page, right?
That was surely wrong.
Tried to change it now, doesn´t work yet.
Do I have to change anything else after having deleted the former target page?
THANK YOU 🙂
Yes but can you please tell me where exactly you added the following shortcode? On what page/widget?
[wpv-form-view name="pflanzen-suche" target_id="68727"]
It´s PHP-generated in the shortcode-widget in the primary sidebar:
function ar_suche() { $ausgabe = ''; if (( ar_url('/pflanzen-suche/')) || ( ar_url('/pflanze/')) || ( ar_url('pflanzen-lexikon/')) || ( ar_url('pflanzenlexikon/')) || ( ar_url('pflanzen-lernkarteien/'))) $ausgabe = '<div style="width: 100%; float: none; clear: both; display: block;"><h2>Pflanzen-Suche</h2>[wpv-form-view name="pflanzen-suche" target_id="68727"]</div>'; $ausgabe = $ausgabe . '<div style="display: block; width: 100%; float: none; clear: both;">'; if ((! ar_url('/gruppen/')) && (! ar_url('/mitglieder/')) && (! ar_url('/docs/')) && (! ar_url('/tauschsache/')) && (! ar_url('/tauschen/')) && (! ar_url('/gruppen/minuto')) && (! ar_url('/gruppen/tauschring')) && (! ar_url('/docs/tauschen-')) && (! ar_url('/pflanzen-suche/')) && (! ar_url('/pflanze/')) && (! ar_url('pflanzen-lexikon/')) && (! ar_url('pflanzenlexikon/')) && (! ar_url('pflanzen-lernkarteien/'))) $ausgabe = $ausgabe . '<div id="suche-rahmen">[wpv-form-view name="suche5" target_id="5523"]</div>'; $ausgabe = $ausgabe . '</div>'; return $ausgabe; } add_shortcode('ar-suche', 'ar_suche');
Can you please check now: hidden link
Within the shortcode [ar-suche] you shared that is added to functions.php , I've changed the target_id="self"
[wpv-form-view name="pflanzen-suche" target_id="self"]
I can see its working as expected.
Ok, this works, when being called from the page containing the search results.
However, we would like to call the search from other plant-related pages, too.
E.g. hidden link
This used to work in former times - not any more.
Is there a chance to get that back?
THANK YOU 🙂
You have done many customizations with your site.
On the following page - the form is belongs to different view . When I check the page source, I can see it has the target view ID is also set:
<form autocomplete="off" action="<em><u>hidden link</u></em>" method="get" class="wpv-filter-form js-wpv-filter-form js-wpv-filter-form-15253 js-wpv-form-only" data-viewnumber="15253" data-targetid="68727" data-viewid="15253" data-viewhash="eyJuYW1lIjoicGZsYW56ZW4tc3VjaGUiLCJ0YXJnZXRfaWQiOiI2ODcyNyJ9" data-viewwidgetid="0" data-orderby="" data-order="" data-orderbyas="" data-orderbysecond=""
As you can see with thee form there is already set target_id:
data-targetid="68727"
I suggest you should review your view again and correct it.