theme customizer – can a single option pass multiple values?

I understand what you are trying to do, but you are going in the wrong direction here, you can just check if one was selected in your logic and assign the value there like this: function css_customizer(){ $blog_setting_val = get_theme_mod(‘blog_setting’); $opacity_val = ($blog_setting_val == ‘block’) ? ‘1’ : ‘0’; ?> <style type=”text/css”> .blog__Link{display: <?php echo … Read more

Remove value from array within post meta ajax admin

You’re not printing anything from the AJAX callback. Trying using wp_send_json_success: function ajaxtestdel(){ global $post; $currentPdfs = get_post_meta( $post->ID, ‘pdf_upload_url’, true ); $postValue = isset($_POST[‘postid’]) ? $_POST[‘postid’] : ”; $array_without_strawberries = array_diff($currentPdfs, array($postValue)); update_post_meta( $post->ID, ‘pdf_upload_url’, $array_without_strawberries ); // Send something back to AJAX wp_send_json_success(); } I have a feeling that perhaps your jQuery selector … Read more

Update to functions.php not showing in dashboard

It looks like I have solved my own problem. I’m guessing that a function like that creates a permanent change, regardless of whether the function remains in the functions.php file. So, to fix this, I just added a new function reversing this adding. Here is that function: function remove_theme_caps() { $role = get_role( ‘author’ ); … Read more

Change link for “add new” buttons on custom post type

in most of the case WordPress ui uses admin_url() function to retrieve administrative urls. so you can use admin_url filter to modify that. Example: add_filter( ‘admin_url’, ‘wpse_271288_change_add_new_link_for_post_type’, 10, 2 ); function wpse_271288_change_add_new_link_for_post_type( $url, $path ){ if( $path === ‘post-new.php?post_type=your_custom_post_type’ ) { $url = get_permalink(/*your post ID here*/); // or any other url } return $url; … Read more

Why is my ‘export’ option missing?

I was going through the same problem. I wanted to export content from my free WordPress site to my new self-hosted WordPress site. But I couldn’t see the export option in my setting. All you have to do is get support from wordpress itself. You can get detailed information here https://wordpress.com/support/export/ To directly export, click … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)