Skip Navigation

[Resolved] Cred form for site logo

This thread is resolved. Here is a description of the problem and solution.

Problem:

How to create a form to set the site logo in the front end form.

Solution:

In most cases, the WordPress site logo value is stored in your database "wp_options" table, but Toolset Forms can not manage data in that table, so there isn't such kind of built-in feature within Toolset Forms.

And in your case, you can consider custom codes, for example:

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/cred-api/

This support ticket is created 4 years, 5 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Waldo 4 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1730073

Tell us what you are trying to do?

I cant seem to find documentation on how to create a form to set the site logo in the front end form.

If you can point me in the right direction pls.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#1730271

Hello,

In most cases(some themes), the WordPress site logo value is stored in your database "wp_options" table, but Toolset Forms can not manage data in that table, so there isn't such kind of built-in feature within Toolset Forms.

And in your case, you can consider custom codes, for example:
1) Create a post form editing post, with featured image field
https://toolset.com/course-lesson/front-end-forms-for-editing-content/

2) Create a post "My site logo", in post content display above post form
After user submit the form, use action hook cred_save_data to trigger a PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/
In this PHP function, get the new featured image value:
https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/
And update your theme logo setting value:
https://developer.wordpress.org/reference/functions/update_option/

For which "logo" option should be updated, please check it with your theme author.

#1730403

My issue is resolved now. Thank you!