Update user_email via php – WP 4.7

I got it to work using $wpdb->update: $ID = $current_user->ID; $email = sanitize_email($_POST[’email’]); $wpdb->update($wpdb->users, array(‘user_email’ => $email), array(‘ID’ => $ID)); Not exactly sure what the issue was with wp_update_user unfortunately.

Child theme not visible in backend

Assuming the parent theme properly enqueues it’s style.css, there is no need for your child them to also enqueue it. As follows: parent themes’s functions.php add_action (‘wp_enqueue_scripts’, ‘parent_enqueue_scripts_styles’) ; function parent_enqueue_scripts_styles () { wp_enqueue_style (‘parent_style’, get_template_directory_uri () . ‘/style.css’) ; return ; } child themes’s functions.php add_action (‘wp_enqueue_scripts’, ‘child_enqueue_scripts_styles’) ; function child_enqueue_scripts_styles () { wp_enqueue_style … Read more

meta field for numerous links

I an not entirely sure that I understood the question but I am guessing you need to publish an array of specific links on each post page. The best option will be to save the links in a meta field for that post. Note that you can store the links separated by a comma. Something … Read more

What image is this pulling?

$image = get_post_meta(get_the_ID(),’image’,true); This line is pulling the URL of the image from a custom field for that particular profile page. Do you see any custom fields in the admin there? Make sure you have the custom fields checkbox checked in the screen options tab (top right in the page admin).

Changing WordPress author name in database

Take a back up before trying anything! 🙂 (I use the Duplicator plugin for that, if you don’t already have a solution. When you delete users in WordPress, it gives the option to attribute conent to another user. Would this suit your needs?

How to handle the structure of page/taxonomy/post without making wordpress get confused with the url

I found a workaround, i added to functions.php the below code : This code checks if current page is page or not. If it’s not page that means it is mysite.com/watches/term/ otherwise if it is page mysite.com/watches So problem solved. add_filter(‘template_include’, ‘template_include’); function template_include($template) { $post_type = get_post_type(); if(!is_page() && $post_type == null && !is_archive()) … Read more