Image Prebuilt
Hello, guys! Hope you’re doing great.
I’ve noticed that all prebuilt template boxes are assigned the default image from
images/prebuilt-default.png. I’ve personally used to assign a specific image using field
'description' => __('<img, but now it is not working anymore, it’s reverting back to the default image.However I can’t see a new way to assign the image, “name” & “description” being the only fields that I’m aware of in array layout.
Any thoughts?
Thank you!
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
2Hi,
Well that’s awkward. That seems to be missing from the docs. I just committed a PR to correct this.
You can set a screenshot via by setting up a key with the screenshot and the absolute value to the screenshot. For example, the following would work:
'name' => __('Fancy Layout', 'langage-stuff'), 'screenshot' => plugin_dir_url( __FILE__ ) . 'layouts/screenshots/layout-screenshot.png', 'widgets' => ...Obviously, I’ve omitted the widgets code but that should give you an idea of how it would work. You could also reference an external website via that link if desired.
Hi, Alex
this is extremly useful. I will proceed with updating my themes now:)
Thank you so much for the valuable information, I’m sure it will help others as well!
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.