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.
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.
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.
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.
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
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.
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!