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
- adding the category to the admin column for a custom post type?
- Change page title in admin area
- How to filter by post-format in admin?
- sortable custom column in media library
- how do I force a single column layout in screen layout
- Make fonts.com font work in TinyMCE (iframe referrer issue)
- Sortable admin columns, when data isn’t coming from post_meta
- wp_list_table search box does not show
- Securing wp-admin folder – Purpose? Importance?
- stop redirection on /wp-admin call to /wp-login
- How to Display Post Excerpts in Admin by Default?
- Wp3.5 Media Gallery Edit modal: change captions to title
- What is the capability that permits access to WP-Admin?
- WordPress in sub directory wp-admin problem
- Opening specific posts on WP takes lot of time and freezes the editor
- Is it possible to set a option, and then redirect to another page directly from a admin notice link?
- How to load a CSS file into WordPress admin area using Child Theme? [closed]
- Getting “Cannot modify header information – headers already sent” error, but only on backend
- WordPress admin menu gap when debug mode is enabled?
- Call to undefined function insert_with_markers
- Cookie value cannot be read until I’ve logged into the WP admin
- How to inhibit dashboard and profile management access to normal users?
- What corrections does this code need?
- Admin Blank Page with Working Front-End After Updating to WordPress 4.6
- Distinguish profile user and admin user IDs / get ID of user being edited
- Moved wordpress from localhost to live and wp-admin shows white screen
- Auto create post title in admin
- Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php
- How to add wordpress blog to Windows 2008 R2 site
- WordPress disable ‘Install Themes’ tab
- WordPress Admin Not Loading All Core Scripts
- The uploaded file exceeds!
- Admin table list API?
- wp-admin – 404 after custom login form
- How to change user admin_color with WP CLI?
- How to apply a CSS file to my admin pages?
- How to create admin tabs [closed]
- Having troubles connecting to WordPress login page using Mamp
- WP Admin/ WP Login Redirect to themselves
- Unable to log in to localhost wp-admin page on XAMPP server
- Remove or move admin submenus under a new menu
- Missing ‘Move to Trash’ option from bulk select box
- Trying to get custom js files in my admin header
- Can content be recovered in this situation?
- Efficient way to check local WordPress php files and Database for malicious code? [duplicate]
- Why am I locked out of the system?
- Is it possible to create two different wp-admins for a wp website
- how to customize the default #adminmenu in wp-admin
- Disable the “remember me” to wp-admin
- How to Restrict Access to all wp-admin pages for subscriber users
- Why is WordPress enqueuing admin relevant scripts (e.g., React, ReactDOM, Redux, hooks, TinyMCE etc) when not logged in?
- wp-login not found – All usual solutions not working
- Is there a filter to edit html of user-edit.php
- How do I change the hover (focus) color of admin bar from frontend?
- What do I need for testing a single script in admin
- wp_get_update_data() function running on every admin request
- WordPress multiple admin notices on post update/add
- Sub menu is not working properly
- Programmatically emulate viewing a post in wp-admin
- Do not load the site as soon as you enter the WordPress panel
- How to remove some author fields from the edit comment page in wp-admin?
- When i try to open Localhost/wordpress/wp-admin . An Error appears ” Registration Has been Disabled” . No login page is shown in the browser
- WordPress Migration Post Problems
- How to remove the color picker code from users-edit.php
- wp-config.php not affecting my site
- How to prevent spams from admin-ajax.php file?
- Can’t access WP-Admin via HTTPS
- wp-admin and wp-login.php not Accessible after Cloudflare
- Get rendered HTML of Page in Admin Area
- Having SSL enabled on admin, but disabled on post preview and live preview?
- Random authentication failures on a load balanced WP setup
- Can I get programmatic access to wp-admin?
- Strange URLs admin area bug
- remove_query_arg on options.php
- wp.svgPainter cannot init error, causing issues with admin panel
- mysql_escape_string PROBLEM
- Cannot access my wordpress website
- Google flagged a wp-admin redirect as phishing
- Custom comment action
- Problem with admin columns
- Checkbox not showing as checked on UserProfile (even with checked=”checked”)
- get_current_screen – ‘Trying to get property of non-object’ error
- Added fields in quick edit screen need to update at the moment
- Custome column sort by date not title
- Modify admin panel tab position
- No HTML/Visual mode option in admin panel (New Post)
- Removing Author name
- not able to add thumbnail custom field in dropdown
- No wp-admin, wp-config, or .htaccess folder/file
- Taking over a WordPress site
- wordpress admin is broken [closed]
- LinkControl not showing suggestions when used on admin page
- Https Website: CSS and JS files load in http and admin page does not load too