wp_remote_get() to get AJAX url /wp-admin/admin-ajax.php
wp_remote_get() to get AJAX url /wp-admin/admin-ajax.php
wp_remote_get() to get AJAX url /wp-admin/admin-ajax.php
Is there an easy way… AFAIK, no, not at all. If using a single site installation, you’d need to carefully disable (not hide, disable) all possible user actions that modify things. And this has to be done screen by screen (Posts, Pages, Comments, Appearance, Plugins, etc). For example, in the All Posts screen (/wp-admin/edit.php): /** … Read more
I’ve been struggling with the same problem…when args[0] is publish, args[2] is not populated. You have to get it from the url. if(substr($args[0],0,7)==”publish”){ $postid=$_GET[“post”]; if(!isset($postid))return $allcaps; } else $postid=$args[2];
It is not really difficult. Manage columns in posts list you can with 2 hooks: manage_posts_columns, manage_posts_custom_column add_filter(‘manage_posts_columns’, ‘wordcount_column’); function wordcount_column($columns) { $columns[‘wordcount’] = ‘Word count’; return $columns; } add_action(‘manage_posts_custom_column’, ‘show_wordcount’); function show_wordcount($name) { global $post; switch ($name) { case ‘wordcount’: $wordcount = YOUR_WORD_COUNT_VALUE echo $wordcount; } } Then you only need calc word count … Read more
It’s not as hard to solve as one might think… If only all plugins/themes respect best practices. If they do, then all links to admin-ajax.php are generated with admin_url function. And this function has a hook inside, so we can modify the url it returns: // This will change the url for admin-ajax.php to /ajax/ … Read more
Congrats on starting your first WordPress child theme. I’d recommend scraping what you have (because we don’t know exactly what’s wrong) and starting with the simplest child theme you can. Then add stuff until something breaks or you finish the child theme. To get started on a very basic child theme, create a new sub-directory … Read more
I also had the same redirect problem when trying to access wp-admin/network. Performing below changes fixed it. 1). In wp-config.php file, added www.website.com rather than just website.com define(‘DOMAIN_CURRENT_SITE’, ‘www.website.com’); 2). use phpmyadmin –> wp_blogs table Add www. to the domain value Basically, both site name and blog name have to be exactly the same. Cheers!
Problem found to be caused by the plugin Enhanced Ecommerce Google Analytics Plugin for WooCommerce version 1.0.16. I gather the fact that this version of the plugin has not been tested with WordPress 4.3.1 has something to do with the problem.
There’s only 2 general places the problem could be: One is the theme and two is the plugins. The actual problem is that there’s a deprecated function that’s being called. The header already sent message is just WordPress’s way of telling you the backend broke before it could build the frontend. I suggest you: disable … Read more
You need to use admin_enqueue_scripts hook to load CSS in admin area. This goes in your themes functions.php. Assumed that your file is at child_theme_path/css/admin-css.css function wpse239532_load_admin_style() { wp_enqueue_style( ‘admin_css’, get_stylesheet_directory_uri() . ‘/css/admin-css.css’, false, ‘1.0.0’ ); } add_action( ‘admin_enqueue_scripts’, ‘wpse239532_load_admin_style’ );