Skip Navigation

[Resolved] Elementor Single Page Overide after wpml setup

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Author
Posts
#1234064

I am trying to: finalise the website with WPML Translation, after the wpml setup for the Archives section, the CPT archive and template designed with elementor/Oceanwp ceased to be linked as default archive and Single page for the CPT in place.
It wokred before setting up wppml with toolset/elementor

Link to a page where the issue can be seen:
hidden link

I expected to see:
hidden link

Basically the same view however it misses the Header image setup in the Archive elementor Template and footer setup in oceanwp settings

Instead, I got: the liste and search w/o the other elements as set in elementor (THe footer is just not an option in the Theme Settings of the Layout, just header top bar etc.

#1234235

Hi there,

I would really need help when possible ? sorry just got our deadline today, all was going well until we started translating the content and all the Template for Archive and single are not linked to the views or the Site's link (Ie the default list page or landing from taxonomy link don't use the elementor template for the archive which worked great until we translated)
WE then created Content layout but now the LAyotu of the elementor template isn't there anymore just the content template with header and footer from Oceanwp, but no the layout setup for those custom post Type in elementor Theme Builder and attached to the CPT.
Same thing for the single template created in elementor theme builder for the single template of each CPT we created with toolset.
All was working just fine until wpml and translation, P{LEASE HELP (Sorry for the scream ... not much sleep and stessed out ... I appreciate any help pointer etc... I am crawling all forum and tuto in search but I am starting to drown due to being new to toolset....arghhhh )

Thx
Stephane

#1234354

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Stephane

I'm taking a look at this now. It's not clear whether it is a WPML issue or a Toolset issue, but I will take a closer look to try and identify the problem.

Reading your posts your setup is not clear, so let's first clarify that if we can.

Your theme, OceanWP, outputs the header and footer and main content area for single custom posts, and archives of custom posts.

You are also using Elementor Pro, which means you can create templates with Elementor to override what the theme outputs for any or all of the header, the footer, and the content area.

Toolset also lets you create templates, which can override what is displayed in the main content area. You have Layouts installed, but because you are using a page builder (Elementor), I wouldn't expect you to use Layouts on the site at all, and because you cannot design Toolset Content Templates with Elementor, most clients with a similar setup don't use Toolset's Content Templates either, and use solely Elementor templates.

So can you confirm how you set this up in terms of what templates are being used for what?

And the problem is that once you use WPML to translate content, the correct templates are not being used for the translated content?

#1234412

Hi, and thank you so much for your time ? I can't hide that I am on a deadline from hell and all that was working fine priori transalting went to sh...t and I am desperate for help!
I am new to Toolset/Elementor environment an dit is a great combination, I do love both tools, just need a little more experience and practice to be more confortable in this environment.

So.

I use: Oceanwp / Elementor + Pro / Toolset / WPML

Site is in French (Default) / English 2nd

The Site has 3 Post types ( inc WP Stnd Post-Blog Archive):
-WP Post
-Knowledge Base Docs Type (Using only stardard fields)
-Client Case Studies (Using Custom Fields)

I have initially set up Archive and Single pages template using the Theme Builder in elementor for each of the Post Type (Inc WP Post), it works a charm w/o the need to create a page.
I first created the View for each Post tpe list and then added it using the Toolset Widget int he Archive Template.
As for the Single Template I didn't have to create a view or anything at that point, I created it straight up in elementor builder and set it as the Single Page instance for the related Post Type in the page condition.

When it came time to integrate the translated content I ticked [Create different Content Templates for each language] in the WPML Integration of Toolset, thinking I needed to do so so that each Archive and Single Template can have their heading updated to the English. Now I believe it is when the cookie started to rumble.

After that I realised that all my Archive and Single Template weren't used accessing the Archive Link I had for each (/document/ - /cas-client/ ..) So reading up I thought it was I didn't use any Layout/template for the Archive and Single Page in toolset (ie. up until then I didn't have any Archive or Single Page created against the Post Type in Toolset, the front end would simply pickup the elementor Archive/single according to Post Type viewed)

At this point I made sure all steps were properly setup, I started to create LAyout / Content Layout to create the Archive and Single in toolset hoping it would fix up the link with the elementor template. but not
I also tried to reverse and take them all off as it was ... nada

Finally I untick the option that I think put it all out in the WPML Integration of Toolset to [Use the same Content Templates for all languages] .... after this a glimmer of hope I got one of the Post Type Archive and Single working again and also operational in multilingual mode // english .. a small victory but but ... the other Archive template are not playing ball. Although I feel the Case Studies/Cas CLient Post type is setup almost identically to the Base Document/Knowledge Base, it just doesn't show the rihght Archive/Single Page.

So at this point I have 1 out of 3 of the Archive/Single from elementor Pro working as for the 2 others I am still onit.. and I crossing all my finger you can point me int he right direction as to understand what's what and learn from it ...

So if I understand I shouldn't use the Layout Plugin but use elementor Pro Solely and Views I guess?

I will wait for some instruction befor eI break something else now.
I can't stress enough how tight I am with time.. need to deliver tonight here.. I obviously totally understand you are busy and can only hope you will be able to spare a moment to help me thru it.

In advance, thank you for your time
Stephane

#1234417

Just some additional info ont he Post Type and Templates:

++++++++++++++++++++++++++++++++++++++++++

Blog/WP PT Post Archive:

ARCHIVE:
URL: hidden link

How it should look: // Elementor Tpl:

hidden link

++++++++++++++++++++++++++++++++++++++++++

CPT/Toolset Documents

ARCHIVE:
URL: hidden link

How it should look: // Elementor Tpl: (THIS ONE IS FINE)
hidden link

++++++++++++++++++++++++++++++++++++++++++

CPT/Toolset Cas Clients

ARCHIVE:
URL: hidden link

How it should look: // Elementor Tpl:
hidden link

++++++++++++++++++++++++++++++++++++++++++

thanks
s

#1234448

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I've been doing some testing on a local install with Elementor. I may be missing something, but it seems that the options when using Elementor templates for archives are limited and not so useful.

On an archive page WordPress runs the main query that gets the corresponding results, which the theme template file iterates over to output certain content for each of the posts.

Elementor templates let you replace what the theme would output with something else. What is output is determined by the Elementor "Archive Posts" widget. The options for what content will be output (and how) are limited, and it also only appears to work with standard posts and not with custom post types.

It sounds like you have tried to get round this by not using the Archive Posts widget, and using a View instead. Or rather, as well, because the main query is still run by WordPress on the page, but the results are not used anywhere, and you run a custom query in addition using Views, which is what outputs the content.

I suspect this may be where you start to run into problems when it comes to displaying translations.

I would not use Elementor templates for custom archives, I just don't think they work well enough. (But the Elementor templates for single posts work fine.)

I would remove such archive templates and create them with Views instead, when you should expect them to work seamlessly with WPML.

So, after removing the Elementor archive templates, go to Toolset > WordPress Archives and create custom archives for your post types. If you were already making Views to fake the archives with Elementor, you should find the process very familiar (and if you added custom markup to the output you can even just copy it across from your View to your custom archive).

Test that it works as expected. The custom archives will still be using the main query but the design of the output will be according to your design.

You don't need to specify content templates as translatable in WPML.

That removes any complication coming from Elementor templates for archives, which don't seem appropriate in this case anyway.

Let me know if that is an option and how it goes.

#1234458

Hello,
So I am going thru the all thing step by step making sure all is set properly.
The good news is I managed to recover the Post Type Archive and Single and it is working on wpml as wellll .. big relief!

Basically the issue was that the Elementor Templates for the ARchive, each translation would allow me in the first place to set the display conditions for the translated template but read somewhere that it would be picked up from the default language template. Now in looking closely the one CPT that had the archive and single working add the conditions properly set in the default and the english language.... I did the same for the other archive translation and voila I recovered mostly the Archive/Single as per the elementor templates.

I am just still struglling with a couple of thing:
1. The Search Result Page which now returns no result FR or EN

2. The WP Post type with taxonomy filter in the url. I had to create 2 views for the WP Post type listing
>one with the Search filter section / set by the URL parameter wpv-xxxx
>one with just a [Categories the same as the current archive page]
However it used to work ok having the main list with filter and if accessed via a taxonomy link it would list the related record for this taxonomy/PT (ie url [site-root]/category/xxx)
This is sadly not working anymore and I get a 404 page.
Elementor template for this archive are properly set to show for Category/Tag
Since I set this up I realise it had to do witht he Category permalink it uses. Since it is a WP post Type the url for the Category is /category/ so I can't have the Search parameter in it since it does go to the Searched archive witht e?wpv-xxxx parameter, so I created a new Template to show only on Category taxonomy which I set to [Categories the same as the current archive page] however this sadly doesn't work anymore?
any idea?

thanks

#1234483

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I looked on your site and you have created an Elementor template for the search archive that uses the Archive Posts widget to output the results. It is possible to create a custom archive using Toolset for the search archive, but you're not doing that and Toolset doesn't seem to be involved in the search results, so I can't really comment on why the results you expect to appear are not showing up.

I'm not sure I follow why you are doing what you are doing in the second question.

The URL for a category archive is something like site.com/category/engineering.

If you create an Elementor template for this archive but don't use the archive results and instead add a View to the page—which is not really the right way to go about displaying an archive but can be done—you can add a Query Filter to the View to get the category from the URL.

It sounds like you know this much.

So where does using the URL parameter come in?

If you are trying to add a search filter so that when visiting the "engineering" category archive a user can switch to a "marketing" archive, well, you can't add two Query Filters for the same taxonomy (i.e. categories), you either take the category from the URL itself, or from a URL parameter added by the filter control, but not both.

You should probably add a dropdown with links to the other taxonomy archives so that if the user wants to switch from the engineering to the marketing archive they actually navigate to site.com/category/marketing and not site.com/category/engineering/?wpvcategory=marketing, but I'm not sure from your question if that is what you are actually aiming to do.

#1234620

Thank you Nigel,
I got most of it working ok now, just a little glitch on the search not returning all results yet, but I'll work on this later.
Regarding the issue with the archive not wanting to play ball with taxonomy page, it was actually 'just' an issue with the slug.
Somehow the post type created were mixed in french and english as original language, which may have to do with the multilingual setup and the setup were maybe in english then moved to french default ... so in the end the slug for the original language were in english .. bad slug .. bad result!

anyway, I am feeling a little relieved this is mostly behind me and can concentrate on deploying now.
thanks again for taking the time, most appreciated 🙂

#1234621

My issue is resolved now. Thank you!