-
AuthorPosts
-
August 24, 2017 at 11:14 am #843395
Hi,
I realized, that after activating a shop main page with layout builder the search of products with URLs like:
/?s=trvb&post_type=product
does not work any more. It Shows the shop main page, instead of serach results.In my opinion the ENFOLD filter
add_filter( 'pre_get_posts', 'avia_woocommerce_default_page' );
does always show the shop main page, also in this case of product searching calls.My temporary solution is to deactivate this filter, but I think the Code should also evaluate whether the call is a search or not.
Regards,
MichaelAugust 24, 2017 at 11:34 am #843402Hi,
the above mentioned solution does not realy work, since the shop main page, created with the layout builder will Show the woocommerce Default products at the end of the page and therefor destroys the layout.So I deleted my Code to remove the filter againg and changed the theme’s source Code within function avia_woocommerce_fefault_page to add the last if condition:
if(!$query->is_admin && $query->is_main_query() && !$query->is_tax && $query->is_archive && $query->is_post_type_archive //added! && !$_REQUEST['s'] )
Hopefully you can see my Problem and help with a solution in the next theme update.
Thank you in advance,
Regards,
Michael- This reply was modified 7 years, 2 months ago by zwachm.
August 28, 2017 at 6:09 pm #844941Hi,
That is something we have never been reported before.
Can you please try help us identify the issue as much as possible?
How is it happening, what is not working, as much details as possible pleaseBest regards,
BasilisAugust 29, 2017 at 6:15 am #845197Hi Basilis,
ok, I will try to summarize it again:
– my shop main page is designed with the advanced layout builder
(it seems, that on some places in ENFOLD codes, this makes a difference, since de
Default woocommerce query is stopped and replaced with the layout code)
– in my opionin the Default search URI for woocommerce product search is like this: /?s=trvb&post_type=productThis does not work in my Environment and Shows the shop main page insted.
My conclusion was, that ENFOLD replaces the Default query of the shop main page, which is used
in woocommerce also to get the result for the search.Does it help and is my assumption correct? If so, it should easily be able to get reproduced on another System…
Regards,
MichaelSeptember 4, 2017 at 6:36 am #847517Hi,
Are you using the Woocommerce Product Search widget? Please provide a link to the shop page.
The “avia_woocommerce_default_page” function will no be executed unless you enable the “avia_custom_shop_page” support which we don’t recommend because a lot of the default product features doesn’t work well with it. Did you enable the “avia_custom_shop_page”? Do you have the following code in the functions.php file?
add_theme_support('avia_custom_shop_page');
Best regards,
IsmaelSeptember 6, 2017 at 7:32 am #848456Hi Ismael,
yes, the
add_theme_support( 'avia_custom_shop_page' );
is active, since I have to use the layout editor for the shop main page.Since my above mentioned correction is active, you will not see the described fault at the Moment.
Please find the Login account within the private section.
Regards,
MichaelSeptember 7, 2017 at 3:58 am #848930Hi,
Thank you for the info. Is the modification working correctly? We will report the issue to Kriesi. For now, you can extract the whole “avia_woocommerce_default_page” function and put it in the child theme’s functions.php file.
Best regards,
IsmaelSeptember 8, 2017 at 6:31 am #849397Hi,
thank you for your Suggestion. after adding the filter
add_filter( 'pre_get_posts', 'avia_woocommerce_default_page' );
too it worked.Please tell me whether you or Kriesi will give me a notice, if they have corrected the issue in the next update?
Regards,
MichaelSeptember 8, 2017 at 8:59 am #849487 -
AuthorPosts
- You must be logged in to reply to this topic.