I am not sure about the issue, but my advice would be to try and refactor this to use get_posts()
and template tags that can work without $post
global variable. Basically do not touch globals at all.
Loops in front-end are almost civilized nowadays, but internals of admin are still very wild. 🙂
Related Posts:
- Organizing Code in your WordPress Theme's functions.php File?
- How to check if a user is in a specific role?
- Can I rename the wp-admin folder?
- How do I Enqueue styles/scripts on Certain /wp-admin Pages?
- Changing Admin Menu Labels
- Adding custom columns to custom post types
- Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?
- adding custom stylesheet to wp-admin
- Can’t change language (only “English (United States)”)
- Is there ANY way to remove comments function and section totally?
- How to use “menu_order” field for posts?
- “Too many redirects” ONLY when trying to access wp-admin page
- How to restrict dashboard access to Admins only?
- Admin Page Redirect
- Unable to access my plugins [closed]
- Can admin-ajax.php be used for spam purposes? And if yes, how to prevent that?
- Can a wordpress admin see my failed Login attempts?
- LinkControl not showing suggestions when used on admin page
- PHP Fatal error: Uncaught Error: Cannot unset string offsets when trying to upload any file to media library
- Site admin can login but cannot access wp-admin after domain migration?
- Wp doesn’t save meta box data
- How to display content depending on the Woocommerce Product Category
- WP-Admin not reachable
- My website does not load since two days!
- Move Custom Taxonomy Menu to Top Level Admin Menu
- Extend user search in the users.php page to allow for searching by role and excluding specified email domains from the “users search” input box
- Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the “users search” input box
- How Can I Prevent Admin User Role Loss?
- Redirecting the user to the admin table area after publishing a post, getting an invalid response error?
- Why when I click on a link into the WP admin panel I am redirected to a link that doesn’t contains wp-admin prefix, so I obtain 404 error
- Override WordPress Core File?
- WordPress Users page missing user count next to different types of users
- How to make the Panel // WP-Admin lighter via Mobile
- How can you change the admin dashboard URL without symlinking?
- get_current_screen() does not return parent_file
- Valid WordPress html elements
- After Upgrade: $user becomes unknown (id: 0) after successful login?
- Redirect users based on their roles, is_admin()
- Unable to access WordPress admin panel
- Custom login form logo not displaying
- Is it possible to hide or encrypt the display name after login into the WordPress admin panel?
- React Material UI and WordPress Admin Area
- Degraded WordPress admin dashboard performance [closed]
- Only Admin receives email
- insert an admin table inside another admin page
- is exposed wp-admin site a serious security vulnerability
- /wp-admin/ – this link showing me “Index of /wp-admin”/ instead of dashboard
- fails upload images in posts + wp-admin/upload.php 403 error
- What methods are you using to transfer individual WP site components from one site to another?
- Searching for a custom meta from user.php in the admin
- Not receiving verification email to update administrator email in wordpress
- Featured image bugging out when using svg
- how to Hide all products except the General Manager role in the WordPress admin panel?
- WordPress site shows a white page for site/wp_admin. A login returns again to the login screen
- WordPress Localhost migration issue
- Https Website: CSS and JS files load in http and admin page does not load too
- Cannot Access wp-admin
- disable admin bar except administrator
- Error 403 on wp-admin – Redirection to upgrade.php
- wp-admin is opening but the site isn’t opening
- Word press wp-admin redirecting to reauth=1
- Can’t access backend
- Admin utility classes?
- Can’t Access Wp-admin Login Page I get 500 error
- Can a user submit requests to wp-admin/admin.php without logging in?
- Unable to login or reset password via wp-admin
- when creating menu in wordpress it shows database can not be inserted
- WordPress Add/Edit Post right admin sidebar change title
- My wordpress admin backend doesnt go to links anymore
- Admin access to secondary site user_can_access_admin_page losing login
- Fresh Install – WP6 – Sorry, you are not allowed to access this page
- redirect wp-admin/profile.php to members/your-profile
- Administrator user cannot access dashboard after localwp import
- WP Admin Bar no longer appears in Dashboard
- Can no longer access Admin panel
- Unable to get the correct URL using get_the_post_thumbnail_url() in wp-admin
- WordPress change role from administrator to author by itself (automatically)
- Display SKUs in admin order list for new HPOS
- admin_enqueue_scripts not load custom scripts from cdn
- WP dashboard messed up
- User can see and enter the WordPress Admin without login
- When typing, comment bar opens all the time in wp admin
- Impossible to access the site administration
- How can I add classes to the Gutenberg iframe (editor-canvas) body tag? Added in WP 6.2(?)
- How to show always the top bar when editing
- How can I have an admin only non-dashboard page in my WordPress plugin
- Wildcard multisite wp-admin url wrongfully redirected
- login_enqueue_scripts changes are not reflecting
- Remove AM/PM in gutenberg add/edit post and use 24-h format
- check if the admin is inside the specific page on the back end
- Display Custom Text if date_picker date is expired
- Array() displaying in all pages of admin -view page source
- admin showing Array() after adding exit() code
- After changing http -> https -> http, I cannot access admin dashboard
- Can I get the role of the currentUser in modern WordPress React?
- Is there a way to get the WP Admin Header to inject as the first element in the body instead of the last?
- prevent wordpress from changing/rewriting url ip with the siteurl settings
- How to prevent a user from updating other users in WordPress?
- white screen when trying to access wp-admin. Can
- Why would “Thank you for creating with WordPress” be displaying part way up the wp-admin pages?