Instead of calling do_shortcode()
just call the function associated with the shortcode.
Example
There is a shortcode named [example]
and a function registered as shortcode handler:
function example_shortcode( $atts = array(), $content="" )
{
extract(
shortcode_atts(
array (
'before' => '',
'after' => '',
),
$atts
)
);
return $before . $content . $after;
}
add_shortcode( 'example', 'example_shortcode' );
In your admin page you just call the function:
echo example_shortcode(
array ( 'before' => 'This ', 'after' => '!' ),
'works'
);
Output: This works!
.
Faster and more reliable than do_shortcode()
.
Related Posts:
- do_shortcode() within Admin Page
- How to prevent parent admin page from appearring as a child admin page
- Add menu option to “New Post” menu in admin bar
- meta box on new admin page
- Custom admin menu order fails if slugs are complicated
- only last option from theme options is being saved to the DB
- Add item to admin panel – w/o plugin & theme
- Remove ‘Custom..’ option in tinyMCE colour swatch
- How to create sub menu with a URL parameter?
- Remove “From computer” media tab for posts with existing attachments?
- Upgrade to SSL Breaks Admin Dashboard
- Disable slow media queries?
- Make sub menu items a main link in the admin menu using fuctions.php
- Can initial focus be set to search field in WordPress Media Library?
- When attempting to update a self-hosted WordPress site, I’m seeing “ASN1 unknown message digest algorithm”
- .htaccess rewrite rule for removing .php extension with exception of wp login and wp-admin
- Too many datadabse connections – upper ceiling mysql
- I can’t access my admin page after changing main url
- How to create a wp admin page (for use in an ajax request)
- Removing user fields [duplicate]
- Creating WordPress Admin Themes
- Add “Page Revised” column to Admin
- Redirect users away from Admin breaks ajax
- SSL Partially breaking admin panel and elementor
- From 403 error to 500 internal server error
- Form validation in WordPress Admin Panel
- XDG-OPEN is not recognized by WP CLI admin command
- Create a admin page in wordpress without admin menus (“wordpress sidebars”)
- How To Reset Ownership And Permissions of Wp-Content Folder, In Order to Fix HTTP Error When Uploading Images to WordPress Media Library
- Woocommerce: Add column to ORDERS admin page with items purchased
- How to declutter admin columns
- Post Bulk Update
- wp_comments table really big casuing /wp-admin/edit-comments.php to slowly load
- How to make the front-end RTL without changing the admin panel language?
- sort tags by tag ID in admin panel
- How to fix ‘WordPress redirection loop problem in wp-login.php page’?
- wp-admin remove part of the url
- WP admin user search doesn’t return all users
- Where are screen options when in admin on mobile?
- post-new.php?post_type=product is not loading properly
- wp-admin redirects to 404
- Generate PDF using tcpdf from WordPress admin side custom page [closed]
- How to use underscore.js in WordPress Admin
- Editor’s role in WP
- Minimum version for WordPress Backbone
- I accidentally deleted an admin user and all their content is now gone from the site. [closed]
- Detect Featured Image remove while editing post in wp-admin (client-side)
- Is wp-admin/about.php required? Can i omit it from my website
- Create reviews and star-rating for user accounts in wp-admin [closed]
- Site Crashes When Updating to WordPress (Version 3.6)
- can’t access backend while frontend works perfect
- How to add Extra Column of post Status in All post page
- Developer/Designer asking for admin access
- WordPress Child theme fails to override parent theme css
- How can I control which plugins run in the dashboard?
- How to change home page only in WordPress
- WP Admin Login keeps redirecting to login
- WordPress admin section appears broken
- Is WordPress secure enough for a multi-user article directory?
- Admin menu success message
- Pages section (only) not loading after publishing large number of pages
- Wp-admin widgets have no title texts
- How to create directory under my active theme directory
- CPU overload spam – redirect link to wp-admin and new post
- define two login page url
- Users can login to Website from wp-admin prior to confirmation email
- Admin Page access
- On Users (user.php) in wp-admin disable/hide “Bulk Actions” and “Change Role To”
- Add HTML to custom post type edit page
- WP site after login keeps redirecting to looped url [closed]
- How can I can I make changes to a WP project I pulled from GItHub?
- WordPress critical error on wp-admin page with 100% permissions
- WordPress Redirects to a cancelled domain, need to change it but can’t get to the admin portal
- WordPress Admin Login Issue
- Edit “Not Available” Page
- admin-ajax and external service interaction
- Add admin page to the top of the admin panel
- Admin page changes the $_POST data
- Wp-admin Redirection loop after moving to subdirectory
- Remove menu item dashboard for a unique user
- Reestablishing Automatic and Secure FTP Connection, Primary Domain Change
- Show only childs and grandchilds of certain post in admin
- WordPress logged in but no access to wp-admin
- Changed the path to wp-login and now can’t access WPress dashboard
- Why my login panel has a wrong language?
- Creating another wordpress site as sub-domain of a wordpress site
- Mixed content and expired session issues with SSL and wp-admin
- Limit access to wp-admin but still be able to log in from different locations?
- How to add conent (text) to Add New pages form of admin in WordPress
- Is it possible to change the images source that are shown in the admin side?
- Using query string on edit CPT page
- How to Filter in the “Add Media Popup” to show only “unattached” Media
- $current_screen if condition for a specific page in admin
- Working with post values in the admin panel
- wordpress login blank screen [closed]
- All of my WordPress sites have Bold Open Sans
- wp-admin blank page after admin login and all security off
- Can a wordpress admin see my failed Login attempts?
- 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
- Cannot Access wp-admin