Solved compatibility issues of BeTheme and WPFTS Pro

There is a compatibility issue when you have a BeTheme (a WP theme created by Muffingroup) installed and you want to use WPFTS Pro in your WordPress site.

Before the WPFTS v2.27.xx, the issue looks like this: when you trying to search anything using the WP standard search, the site is freezing and you can see either white page or 503 error page.

The problem is because Betheme has small integrated search improvement code, which is clearing the “s” parameter in main WP_Query request after the execution, and thus WPFTS Pro get the search query an equal to an empty string and works wrongly when creating Smart Excerpt result items.

We fixed this freeze in WPFTS v.2.27.xx, but anyway it’s still impossible to create and show correct Smart Excerpts items with non-patched Betheme theme. Instead of search results, you will see empty excerpts (no text).

To fix this issue please do the next thing.

  1. Open your Betheme folder (be sure which version of the theme you’re using: either main theme or child theme) and find the functions.php file.
  2. Add this piece of the code to the beginning of the functions.php and save changes.
function mfn_search($q){}

How does it work?

By creating this empty function we are actually preventing of creating the native Betheme’s function which modifies “s” parameter of WP_Query. Thus “s” parameter become not changed and WPFTS Pro works as expected.

 

5 1 голос
Рейтинг статьи
Was it useful? Share the experience!
Подписаться
Уведомить о
guest
0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии