Skip Navigation

[Resolved] dynamic logo in Kadence header

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 9 replies, has 3 voices.

Last updated by hollyR-3 1 year, 10 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2532273

Tell us what you are trying to do?
I am trying to pull a custom field "location-logo" from custom post type into Kadence theme header. I am already pulling the address, email and phone by using code in html blocks.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
No

What is the link to your site?
hidden link
The above link is one of the custom post type pages that I am trying to pull dynamic image into. Home page is pulling the logo the regular way.

Any ideas on how I can make this happen? TIA

#2532679

Nigel
Supporter

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

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

Hi there

I think it would be helpful if we could see what you've done already, where you have some fields working, and how the Kadence custom headers work (I, for one, am not familiar with the Kadence theme, but I guess you can create custom headers for different contexts and design them with blocks).

Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.

#2533223

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Thank you for providing the credentials.

We have just checked your website and we could see that some essential items and settings are missing from your 'Elements' post type, which is the CPT for the Header that you mentioned - Header for Locations, right? Please correct me if I am wrong.

About the missing items and settings, please follow me:

- First, in order to make this work properly, you need to create a field group for your 'Elements' post type, here: hidden link
- You can add an image custom field to the Elements fields group and save
- After this, this image custom field should be available in the Header Element: hidden link
- Then, you would need to insert the logo on this custom field
- And at last, in the Header content you could insert a 'Single Field' block and select the correspondent image custom field

Your request should be achieved after these steps, please give it a try and let us know how it goes. If I have understood anything wrong here let me know and we'll check it again for you.

Regards,
Mateus.

#2533735

I added the custom field to the Elements CPT, however all that does is add a field where I can upload a logo. I am wanting to pull the logos from the CPT's locations. The elements section will give me a shortcode that I can use in the header section.

#2533927

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks for your reply.

But after adding the image on the 'Logo for Locations' field, weren't you able to insert this image field in a 'Single Field' block, like I mentioned above: ' in the Header content you could insert a 'Single Field' block and select the correspondent image custom field'

It should be inserted here, like this: hidden link

Moreover, I'm not sure if this header (Header for Locations): hidden link, is really the header that you're talking about, of if it is the 'Dynamic Logo': hidden link

Could you please clarify it to us? Thanks!

#2533929

"Dynamic Logo" is the one. I have been trying different ways to do this.

Is there a line of code that I can use to spit out the image? I'm currently doing that on the address, phone and email with code.

#2535621

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Thanks for your reply.

In this case, you could insert a raw HTML with the img tag, having the logo URL as the source, like this: hidden link

Further, if you put the logo field as you're doing with the address/phone number, for example: types field='location-logo' output='raw’ , it'll also output the URL of the image.

Please give it a try and let us know if this solves the issue. Thank you.

#2535639

I'm trying to custom field logo not a direct url to the logo. What about custom field code to outputs a image?

#2535813

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Yes, it might work as well, if you use an example like I mentioned above:

Further, if you put the logo field as you're doing with the address/phone number, for example: types field='location-logo' output='raw’ , it'll also output the URL of the image.

Like in this screenshot: hidden link

Could you please give it a try and let us know if this solves the question? Thanks!

#2535903

My issue is resolved now. Thank you!