Live search on mobile + amp.

Posted in: Newspaper
Post count: 221

Hi, team tagDiv.

I am using the mobile theme and have enabled the mobile + amp. Just to let you know my configuration.

I’ve commented the code in the td-ajax file responsible for the live search. Now the live search has been disabled but only on desktop. The mobile version is still having the live search enabled. Is there a different css for the mobile version that has specific live search code. If so, then please let me know so that I can comment it as well.
Thanks.

Post count: 35449

Hi,

So if I understand correctly you want to remove the td_ajax from mobile too, if is so then you should go in wp-content/plugins/td-composer/mobile/includes/td_ajax_mob.php and comment this line of code http://prntscr.com/oih12y -> http://prntscr.com/oih0u1

Hope this will help you!
Thanks.

Post count: 221

Hi, Calin.

I did exactly as you said. The live search is disabled on mobile as well as amp. But there’s one more issue. In the amp version, i.e., domain.com/?amp the live search shows “loading…” when we put something in the search box. It doesn’t show any suggestions/results because the live search is disabled but it shows “loading…”. Why is that and how to remove this?

Please see this screenshot

Post count: 35449

Hi,

You can remove the “Loading..” in two ways, the first one is using a custom css
#src_load{
display: none;
}

that need to be set in Theme Panel>Mobile Theme> Custom code> Css -> http://prntscr.com/oit0du
Or you can comment/remove the code from theme core wp-content/plugins/td-composer/mobile/header-amp.php -> http://prntscr.com/oit3oo

Hope this will help you!
Thank you!

Post count: 221

It worked. Thanks a lot, Calin.

Post count: 221

Hi, team tagDiv,

After the update, commenting the code on line 57 in td_ajax_mobile.php, as suggested by Calin in the his first reply(pls see screenshot), wasn’t working. It was not disabling the live search on mobile theme. So I commented the entire code(entire page). Is there anything that this code is responsible for other than live search on mobile theme. Or is it Ok if I comment the entire code.
Please let me know.
Thanks

Post count: 35449

Hi,

That code should affect only the amp, please check to see if the search on amp is still working, if not please provide some screenshots with the settings/comments you’ve made in the code.

Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.