Where are Additional CSS files stored

It’s stored in the database, within the wp_posts table, under the custom_css post type, where the post name is the theme slug. There you also have the related customize_changeset and revision post types. The custom css post ID is also stored in the wp_options table under each theme mods, e.g. theme_mods_twentysixteen for Twenty Sixteen. It’s … Read more

What SQL Query to do a simple find and replace

The table where your URL is saved is wp_options. You should do an update on the columns that use the URL for your site: UPDATE TABLE wp_options SET option_value = “new domain” WHERE option_name = “siteurl” UPDATE TABLE wp_options SET option_value = “new domain” WHERE option_name = “home” I might be missing some value, but … Read more

Add multiple custom fields to the general settings page

Well the second bit of code is technically the correct way to do it. However, at the end of the add_settings_field() you can pass arguments. Please view the WordPress Add_Settings_Field function reference. This will help you in getting the best understanding of how the add_settings_field() function really works. Now, with that said, you could use … Read more

How To Add Custom Form Fields To The User Profile Page?

You need to use the ‘show_user_profile’, ‘edit_user_profile’, ‘personal_options_update’ and ‘edit_user_profile_update’ hooks. Here’s some code to add a Phone number: add_action( ‘show_user_profile’, ‘yoursite_extra_user_profile_fields’ ); add_action( ‘edit_user_profile’, ‘yoursite_extra_user_profile_fields’ ); function yoursite_extra_user_profile_fields( $user ) { ?> <h3><?php _e(“Extra profile information”, “blank”); ?></h3> <table class=”form-table”> <tr> <th><label for=”phone”><?php _e(“Phone”); ?></label></th> <td> <input type=”text” name=”phone” id=”phone” class=”regular-text” value=”<?php echo esc_attr( … Read more

Nested meta_query with multiple relation keys

The question was for WordPress 3.0, but just in case someone has the same question for a more recent version, from WordPress Codex: “Starting with version 4.1, meta_query clauses can be nested in order to construct complex queries.” https://developer.wordpress.org/reference/classes/wp_query/#custom-field-post-meta-parameters So, that query should work on the current WordPress version.