Skip Navigation

[Resolved] Dynamic content into header template

This support ticket is created 5 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 22 replies, has 2 voices.

Last updated by SteveG9252 5 years ago.

Assisted by: Luo Yang.

Author
Posts
#1368339

Tell us what you are trying to do?

I have created a custom field group + associated custom fields - I figured out how to use a custom field on various pages.
I would like to use the same custom field via JetMenu - which invokes Elementor to create a MegaMenu.

In my current use case, I have a custom field that is a URL - which I am trying to add to Elementor in the MegaMenu to a heading field. I'm trying to add a dynamic URL to the link - it sees the toolset url field - I can click on the dropdown for the relevant URL link - add it - but it does not take.

Now, I had the similar behaviour to a page - but when I refreshed the page that had the field below it ( wordpress edit page ) - and then went back into elementor - it worked - because I guess that page had "context" to the custom field.

Adding a MegaMenu and going into Elementor - it loses that connection / context. So, I am unsure if it is possible to add a custom field this way. Is it possible to add a shortcode for the custom field in the Heading text field or something similar?

Is there any documentation that you are following?

Cannot find documentation

Is there a similar example that we can see?

What is the link to your site?

#1368403

Hello,

For the question:
Is it possible to add a shortcode for the custom field in the Heading text field or something similar?

It depends on the plugins(Elementor and MegaMenu) you are using, I suggest you try with a text widget, and put the Types shortcode [types ...] into text widget content, see Elementor document:
hidden link

And here is the document about Types shortcodes:
https://toolset.com/documentation/customizing-sites-using-php/functions/

#1368497

Hi,

So I am using Elementor Pro and JetMenu ...

1) Custom Field renders for on-Page custom fields and here I use a Header widget - URL dynamically renders with ToolSet URL field - fine
2) In Appearance, Menus - using JetMenu - I then go into a Menu Item - and I now edit the custom link via JetMenu with Elementor Pro. Now, If I choose a Heading widget, choose ToolSet custom URL field for the link ( clicking Dynamic ) - I can see the URL field from dropdown - but nothing renders. Heading widget does not "see" the link. That's my issue - solutions?

#1368499

Since it is a compatibility issue, I don't have a copy of those plugins in my localhost, please provide a copy of your website in below private message box, also point out the problem page URL, where and how can I see the problem:
can see the URL field from dropdown - but nothing renders. Heading widget does not "see" the link.
https://toolset.com/faq/provide-supporters-copy-site/

You can put the duplicator package in your own google drive disk, and share the link in private message box.

I need to test it in my localhost, thanks

#1369569

Thanks for the details, I am downloading the files, will update here if there is anything found

#1369571

Luo - I need to upload archive again - it failed to upload ... will update in a bit.

*** Update *** Archive uploaded

#1369621
test-link-1.JPG

I can install the duplicator package in my localhost, and have tried the steps you mentioned above:
1. Appearance, Menu ( Primary )
2. Hover over Government - click on JetMenu
3. Click on "Edit Mega Menu Item Content"
4. Elementor editor will show - choose a heading, choose "Sample Ballot"
5) in field "Link", setup it as:
Toolset URL Field (test link 1)

See screenshot: test-link-1.JPG

Test it in front-end,
hidden link

I can see it works fine, the menu item "Sample Ballot" does link to the correct URL.
Please let me know if you need assistance to setup a demo in your own website.

#1369641

Luo,

This does not work for me ... As soon as I assign the ToolSet field - this becomes unlinkable both in b/end and f/end ...

Can you test for yourself on the live site? It's nighttime here - so no issues.

#1369653

I have tested it in your website, did not make any change, I can see the menu item "Sample Ballot" is linked to URL correctly:
hidden link

It is correct field value here:
hidden link

field "test link 1", you are using value: hidden link

Is there any missing?

You might try to clear your browser cache or try with another browser, and test again.

#1369669

Nope - not working.

Can you show me a screenshot of what you see when you hover over menu link?

#1369675
test-link-2.JPG

I have asked our colleague to double confirm it,
in URL:
hidden link

the menu item "Sample Ballot" does link to URL hidden link.

And I have checked it in HTML source codes, this link does setup correctly, see screenshot test-link-2.JPG

#1369685

Lou,

On the B/end - when you hover over the link - does it behave as if it is a link?
On the F/end - when you hover over the link - does it behave link a link?

#1369695

To avoid more misunderstandings, if you need more assistance for it, please provide detail steps to duplicate the same problem:
Where and how can see the problem you mentioned above:

this becomes unlinkable both in b/end and f/end

Thanks

#1369707
ballot-link.png

As can be seen my html is quite different from yours ...

I'm stumped!!

#1369735

Can you login into the b/end for me and double check?

It's late for me - I'll check in the morning.