PHP E_WARNING being shown despite php.ini [closed]

Did you check your wp-config.php file for WP_DEBUG constants? //enable debug define( ‘WP_DEBUG’, true ); //save to file define( ‘WP_DEBUG_LOG’, true ); //show in browser define( ‘WP_DEBUG_DISPLAY’, true); See https://codex.wordpress.org/WP_DEBUG for more details.

javascript variable to wordpress php variable

First you need to to send function name as additional data as $.ajax({ type: “POST”, url: compareids_ajax.ajax_url, data: { // Data object compareIDs : compareIDs, action: ‘your_ajax_function’ // This is required to let WordPress know which function to invoke }, contentType: “application/json; charset=utf-8”, dataType: “json”, success: function (msg) { console.log( msg ); }, error: function … Read more

Keep getting this code reparted again and again?

It seems that the permalinks structure has an issue. Please follow below steps to fix it. Step 1: if possible, back up your WP installation folder. Step 2: Temporary disable all the plugins (important step) step 3: in the WordPress admin dashboard, go to Settings -> Permalinks step 4: remember or note down somewhere what … Read more

Array to string conversion error in PHP 7.2 when returning user role as class

This code works and is perfectly valid, running on 7.3, except when your user has two roles: add_filter( ‘body_class’, function( $classes=”” ) { $current_user = new \WP_User(get_current_user_id()); $user_role = [‘administrator’, ‘moderator’]; //just a test, but this is what it’ll look like if it had 2 roles. $classes = []; $classes[] = ‘role-‘ . $user_role; return … Read more

404 Not found error after update to WordPress 5.0

First I tried to disable all plugins and change theme to the default WordPress theme and error is showing yet. Then tried to install a new WordPress 5.0.1 and got 2 errors: theme.min-rtl.css:1 Failed to load resource: the server responded with a status of 404 (Not Found) style.min-rtl.css:1 Failed to load resource: the server responded … Read more