We are trying to display a custom search filter and view output on this page hidden link
When we click on the custom filter area (i.e. text entry box) it just acts as a hyperlink to the last post in the loop.
This is the javascript using the link array. It looks like might be just grabbing the last one as the clickable event:
"undefined" != typeof et_link_options_data && 0 < et_link_options_data.length && $.each(et_link_options_data, function(index, link_option_entry) {
if (link_option_entry.class && link_option_entry.url && link_option_entry.target) {
var $clickable = $("." + link_option_entry.class);
$clickable.on("click", function(event) {
if (event.target !== event.currentTarget && !et_is_click_exception($(event.target)) || event.target === event.currentTarget) {
if (event.stopPropagation(),
"_blank" === link_option_entry.target)
return void window.open(link_option_entry.url);
window.location = link_option_entry.url
}
}),
$clickable.on("click", "a, button", function(event) {
et_is_click_exception($(this)) || event.stopPropagation()
})
}
I need a password to go past the "Password" requirement screen when I try to visit the link you provided.
I've enabled a private reply for you to submit such password.
Related to the Search Input linking to a post - this is unusual.
The script you show, how is it related to the issue?
Is this custom code that was added to the Views Editors?
I'd need precise steps on how to replicate this issue, so I can advise you better.
Thanks!
Hi Beda - I couldn't/can't find the private message area to send the password - where do I find that?
I have reactivated the private message, it is active by default, and deactivates only if you choose to not need private messaging.
Thanks!
The JS you shared initially seems to be from Divi Builder.
I think it's a Link Area or similar as described here:
https://toolset.com/forums/topic/cloning-a-divi-builder-toolset-website/#post-1160535
it seems the DIV home-block-1, or further.
I would suggest to narrow down the issue source, by temporarily disable all Plugins but Toolset, then re-enables them one by one to see which is causing the issue.
Then, try to solve the issue in that Plugin (I suspect some of the HTML or classes used in the builder of the page overwrite child elements)
Please let me know if you can narrow down the conflicting plugin and the HTML, I can have a look in the WP Admin if you cannot, if you can share access to the site.
But I would need permission to eventually create test content, and alter existing views or pages affected.
One thing was a missing closing DIV at the end of the "Search and Pagination" HTML content.
I've corrected that, the ROW was not closing.
Another issue was and still is, in the Content Template used in the Loop of the View.
Something in it adds the link with a script.
I saw in the Content Template when editing it with the Builder you included a link ({!{wpv-post-url}!}) to the Module Link URL setting of the Builders module.
Removing that solves the issue.
I would suggest this:
1. Duplicate the current View to a new one
2. Remove the Content Template from the new view's loop, and recreate all the Search and Pagination, Loop and Layout HTML sections. Pay attention to create closing HTML and not overclose it either. Use the Wizards to generate it where possible, and where not, create the wrapping HTML first, then fill it with your shortcodes. This is simpler to control the closing and opening tags.
3. Now view this View on the front end, it should work fine.
4. Add the old Content Template in the new View Loop - now the View should be working, if my suspicion is right (And it's all due to a missing closing HTML tag).
If that does not resolve the issue, then the problem is with the Module not closing the link it generates for the Featured Image.
I'd then suggest deleting that Module, and eventually, it's row and container in the Builder, and recreate that as well.
(Or, you can eventually duplicate the design to a testing template?)
I did not do this step on the site as I was not entirely sure if I am allowed to do so, however, I was able to confirm the issue being due to the Builders Module as elaborated above.
Note also that I am not sure, the Field of that module supports links in ShortCode format. I suspect there you'd have to enter a real URL, instead of a ShortCode.
Locally, I was not able to replicate such an issue. I think it is both due to unclosing HTML and the ShortCode used as link.
Amazing, thank you so much Beda this is a huge help!
So it was the shortcode in the URL field?
Locally, I was still not able to see that issue even with such ShortCode (returning an URL) in the Module.
Or did you find another HTML unclosed?
It was the shortcode in the module/row URL field - I should have known, I ran into this before and completely blanked on this being the cause.