Settings API not Saving to Database or Display

The issue with the data saving lies in this area of the code (all three similar functions). printf( ‘<textarea name=”%1$s[$2$s]” id=”%3$s” rows=”1″ cols=”30″ class=”code”>%4$s</textarea>’, $args[‘option_name’], $args[‘name’], $args[‘label_for’], $args[‘value’] ); Or more specifically it’s, this part [$2$s], which should be, [%2$s]. I totally get it though, these specifiers can be fiddly and easy to make typos … Read more

Echo get_option displays as text

If you really want to execute code stored in a database, a quick google search reveals that you can use the eval() function to do just that. However, many people do say that Eval is Evil… Instead of storing the entire PHP code of an option in the database, try storing a simple boolean flag … Read more

Woo Commerce Settings for Check-out Form [closed]

This is unlikely to be a Woocommerce setting, or if it is in the Woocommerce settings, it has been added by an additional plugin from the theme maker. Check your theme settings, or for a widget that is configured to appear on user account pages. Since the CSS style .avada_myaccount_user is being used for this … Read more

What type to upload image within theme options?

If using image radio buttons, define a directory path here is code. I hope its going work. $imagepath = get_template_directory_uri() . ‘/images/’; $options = array(); $options[] = array( “name” => __(‘Logo’, ‘prothemeus’), “desc” => __(‘Upload your logo’, ‘prothemeus’), “id” => “pt_logo”, “type” => “upload”);