input data and output table [closed]

Finally done with installing “TablePress” and its extension “Inverted Filter” and making some code edits please follow this for more details https://tablepress.org/ https://wordpress.org/support/topic/how-to-not-show-the-result-of-the-search-query-until-enter-key-is-pressed

New custom theme option (text input) giving index error

Wrap the call in an isset() conditional in this line: <input id=”cpt_theme_options[cpt_sm_dribbble_handle]” class=”regular-text” type=”text” name=”cpt_theme_options[cpt_sm_dribbble_handle]” value=”<?php esc_attr_e($options[‘cpt_sm_dribbble_handle’]); ?>” /> Try something like this: $cpt_sm_dribbble_handle = ( isset( $options[‘cpt_sm_dribbble_handle’]) ? $options[‘cpt_sm_dribbble_handle’]) : ” ); <input id=”cpt_theme_options[cpt_sm_dribbble_handle]” class=”regular-text” type=”text” name=”cpt_theme_options[cpt_sm_dribbble_handle]” value=”<?php esc_attr_e($cpt_sm_dribbble_handle); ?>” /> EDIT Note: your other alternative is to set default options on init, so … Read more

How to save data of an input field to an array

Don’t use update_usermeta, it is deprecated, update_user_meta is the one to use. You get the previously saved value out with get_user_meta. <input type=”text” name=”group[]” id=’group[]’ class=”regular-text” value=”<?php echo esc_attr( get_user_meta( $user->ID, ‘group’, true ) ); ?>” />

WSoD being caused by this piece of code

You have a problem with your code formatting and syntax at the very least: function ref_access(){ global $error; if (is_user_logged_in()) // <– problem here… $newdb = new wpdb( ‘user’, ‘pass’, ‘db’, ‘localhost’ ); global $newdb; $hf_username = wp_get_current_user(); $inputValue = $_POST[$quanid]; $wpdb->insert( $table, array( ‘ItemID’ => $quanid ‘Price’ => $inputValue ‘user’ => $hf_username ), ); … Read more

using checked function to verify value against an array

OK Try the below $current = get_user_meta($user_id, ‘continent’, $true); $categories = get_categories( $args ); foreach ( $categories as $category ){ ?> <label><input type=”checkbox” id=”type-<?php echo $category->name; ?>” value=”<?php echo $category->name; ?>” class=”shopping” name=”top_level[]” <?php checked($category->name, $current); ?>><?php echo $category->name; ?> </label> <?php } If $current = get_user_meta($user_id, ‘continent’, $true); value is an array then try … Read more

Add field to dashboard to update embedded URL on homepage?

Add the below code in the functions.php file and it will create a text field in the general setting options page add_action(‘admin_init’, ’embed_url_initialize’); function embed_url_initialize() { // First, we register a section. This is necessary since all future options must belong to one. add_settings_section( ‘general_settings_section’, // ID used to identify this section and with which … Read more