Import user data using CSV

UPDATE SOLVED I change my code to wp_insert_user beside bp_core_user_signup $user_id = wp_insert_user(array( ‘user_login’ => $user_login, ‘user_pass’ => wp_hash_password( $email ), ‘first_name’ => $first_name, ‘last_name’ => $last_name, ‘display_name’ => $first_name . ‘ ‘ . $last_name, ‘user_email’ => $email, ‘user_nicename’ => $first_name

add_filter img_caption_shortcode not implemented

(gotta read the docs a bit more carefully) I was using this code in the loop $xcontent =get_the_content(); But get_the_content() does not apply filters … as the documentation states (if I was paying attention). I should use the_content(), or change it to this (which is the same as the_content()) : $xcontent =get_the_content(); $xcontent = apply_filters(‘the_content’, … Read more

How to format custom fields when editing an attachment?

You’ll have to include and enqueue a new CSS file for your plugin on the admin side using admin_enqueue_scripts. And since you may want to load this on every page, I’d follow the first example on the Codex (pasted here): function load_custom_wp_admin_style() { wp_register_style( ‘custom_wp_admin_css’, get_template_directory_uri() . ‘/admin-style.css’, false, ‘1.0.0’ ); wp_enqueue_style( ‘custom_wp_admin_css’ ); } … Read more

Enqueue a file that’s not js or css

You could also look to create a special CSS file that you setup an htaccess rewrite rule for. For example wp-content/yourtheme/custom.css And then add a rule in your htaccess: RewriteEngine On RewriteRule ^/wp-content/yourtheme/custom.css$ /wp-content/yourtheme/styles.php [L] You can then call wp-load inside this styles.php file, do any sort of logic required, before outputting your custom css … Read more