Skip Navigation

[Gelöst] Featured Image Required (without code?)

This support ticket is created vor 3 Jahren, 9 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Shane vor 3 Jahren, 9 Monaten.

Assistiert von: Shane.

Author
Artikel
#1971003

I'm trying to make the featured image required (without code, I hope), so member's can't create posts with no featured image (and make the archives pages look junky).

I saw this: https://toolset.com/forums/topic/make-featured-image-required/ but it doesn't explain how to make WP associate the image uploaded via Toolset's Image Field as the Featured Image.

Thanks!

#1971171

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hello,

Unfortunately as the post explains you aren't able to make the featured image required on the backend.

However if you are uploading your posts through our Toolset forms then you can use our Forms validation hook below to ensure that your form doesn't submit with an empty.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

Secondly you aren't able to associate a custom field and make it the featured image per say. You theme will always attempt to pull the image from the featured image field.

A workaround to this is to create your custom post template and have it overwrite your theme's template and you can set in the custom template the custom field to be used as the main image of the post.

Please let me know if this was helpful.

Thanks,
Shane