WPML Search Result Archive

Hi There,
Ive been having a lot of trouble with archive layouts with wpml (and header and footers!).

The specific error I have that has prompted me to raise a ticket is creating an archive for search results. This is required for woo products. I can save an archive but searches revert to wordpress.

Hi @LeeRobertson,

Thanks for reaching out.
Sometimes the only screenshot doesn’t help us to recognize the issue you are having. We need to examine your site to determine the cause of the issue. Can you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Many thanks for info I have added a secure note. To be clear. Creating archives goes wrong, after returning the archive cannot be opened, and the name I have given it is lost. I also now have several duplicate items

I don’t think we redirect the shop page correctly for the WC translated archives. We’ll have to make a fix on our end for that. You can get around this by going around to the translation shop page directly and clicking “Cornerstone > Edit Layout”. Have a great weekend.

Many thanks for your help. I need to create an archive for search. For instance if user searches on this page I need the result to have the same sidebar left. How can I do this?

Hello @LeeRobertson,

Thanks for updating in! I would recommend that you complete editing your Search layout. At the moment, you only have the sidebar. I already checked the condition of the layout and it is correct. This is the layout that will be used when someone is searching. You just need to complete it to display the search result items on the right side column.

Be advised that clicking the Category names on the sidebar will not be considered as a Search. Each of the category names was linked to each respective category archive page. So, if you want the same sidebar on the category archive page, you will have to assign this layout to the category archive pages as well.

Hope this makes sense.

Hi there yes, it does make sense, but I cant work out how to have results show in column 2. I have set conditions for the column and a products area, but it still reverts to other archive layout
https://capture.dropbox.com/W6HJ1glSnpHDPllJ

Are you saying the search archive page has to be the same as the category archive page?

Hey @LeeRobertson,

If you want the current Category page archive like this, https://woocommerce-1069292-3741563.cloudwaysapps.com/pl/kategoria-produktu/kartki-okolicznosciowe-pl/, will also be the same layout for your Search Results page, you can copy the whole Sections and paste it in your Archive layout assigned to the Search page.

Once you have the final layout, you can then replicate or copy this layout again for the WPML layouts of the other languages.

Hope this makes sense.

I did this, saved it and thought I had succeeded so added wpml layout for polish, but now it reverts to previous archive layout
If I search in /bookshop it returns https://woocommerce-1069292-3741563.cloudwaysapps.com/?s=guides&post_type=product

Hey @LeeRobertson,

Set a priority to your Search Results layout.

The example above showed -5. The lower the number, the more it is prioritized to be used as the layout.

Best Regards.

many thanks

1 Like

Hi @LeeRobertson,

You are most welcome.

Is there a reason why my results in posts archive now no longer show? I cant work out what priority is needed

It was working before I changed search archive

Hello @LeeRobertson,

Can you please clarify which layout should be displayed on the Search Results and which layout should be displayed on post archives? Keep in mind that the lower the number you insert will be prioritized.

Best Regards.

Thankyou, in advance. Sometimes I get confused on these layouts, especially where they seem to duplicate then break under wpml.
Is there a way to have archives for woocommerce search and post search?
If not search is most often used for woocommerce items, so I’ll keep that and remove search on posts. This layout works correctly https://woocommerce-1069292-3741563.cloudwaysapps.com/?s=John+Paul&post_type=product
(however there is a bug where in cornerstone editing archive if I press ‘view on frontend’ it takes me to https://woocommerce-1069292-3741563.cloudwaysapps.com/posts/ )
Then I need archives for post category with this correct layout https://woocommerce-1069292-3741563.cloudwaysapps.com/category/artykuly/ and same layout for post search if possible.

Also I cant work out why this https://woocommerce-1069292-3741563.cloudwaysapps.com/pl/artykuly/ or this https://woocommerce-1069292-3741563.cloudwaysapps.com/posts/ shows nothing

Hey @LeeRobertson,

I have checked your layout and I found out that you added a condition in your Post element which has caused the issue where nothing displays on the layout.

Remove the condition to resolve your issue.

Kindly let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.