This topic is: not resolved
- This topic has 0 replies, 1 voice, and was last updated 1 month, 2 weeks ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Community Forums › Forums › Genesis Custom Blocks › Filter for block value on save/adding image as preload link
Tagged: php hooks
We're trying to add a preload link to our head for an image field added via a custom block. To do this I thought it might be easiest to save the image ID or URL to a post meta field and then fetch it when the page is loading. Bit of a hack as outside the main loop but should work.
Unfortunately I can't find an easy way of getting the image field ID on save. I can hook into the render template and get it out from there but it feels like there should be an easier way that will run on save.
© 2023 WPEngine, Inc.