admin showing Array() after adding exit() code
Download your theme using Plugin: Download Theme, and search using code editor like VSCode.
Download your theme using Plugin: Download Theme, and search using code editor like VSCode.
It might be added during development, most probably coming from Theme or Plugin, The best way to debug is download active plugins and active theme using this plugin Download Plugin/ Theme, and open code in VSCode and search for var_dump, var_export, print_r, die, and etc. I’d say first search in Theme than go for Plugins.
If you’ve dropped it right into functions.php and not inside an action hook, the code is running before ACF has initialized. Try running on acf/init action (untested): add_action( ‘acf/init’, static function () { $currentdate = new DateTime(); $date = get_field( ‘date_picker’, false, false ); $date = new DateTime( $date ); if ( $currentdate > $date … Read more
check if the admin is inside the specific page on the back end
Remove AM/PM in gutenberg add/edit post and use 24-h format
Edit: Turns out my issue was the LiteSpeed cache plugin. It got resolved as soon as I purged the cache. I am disabling the cache for the development server for now. 🤦🏽♂️
Take a look at your wp-config.php file. For a subdomain installation, you should have something like this: define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, true); define(‘DOMAIN_CURRENT_SITE’, ‘rareteas.com’); define(‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/”); define(‘SITE_ID_CURRENT_SITE’, 1); define(‘BLOG_ID_CURRENT_SITE’, 1); If you have SUBDOMAIN_INSTALL set to false, change it to true, which is necessary for a subdomain multisite. Next, take a look at your database. Sometimes … Read more
You’ll need something like this: function your_callback() { if ( ! current_user_can( ‘manage_options’ ) ) { return; } // add your code here to display the menu for admins only } Basically you need to check what capabilities the current user has and then select one which only admins have List of Roles & Capabilities … Read more
How to show always the top bar when editing
How can I add classes to the Gutenberg iframe (editor-canvas) body tag? Added in WP 6.2(?)