You can hack by adding below lines in your theme’s functions.php file.
function remove_preview_target()
{
// below JS code will set Preview button's **target** attribute to **_self**, it means same tab/window.
echo "<script>
jQuery(document).ready(function(){
jQuery('#post-preview').attr('target', '_self');
})
</script>";
}
// this action performs in admit footer
add_action('admin_footer', 'remove_preview_target');
Or add below lines in your JS file.
jQuery(document) . ready(function () {
jQuery("#post-preview") . attr("target", "_self");
});
Related Posts:
- How can we make managing lots of pages in WordPress Admin better?
- How to redirect/rewrite all /wp-login requests
- Show all post tags on post edit screen/sidebox
- Add “external” link to admin menu in the backend
- Disable image attachment links
- Remove “Time to upgrade” message from dashboard
- What is the best method to close off the backend?
- Change Login URL Without Plugin
- Pre-fill fields with content from outside when creating a new post
- Why are admin scripts not printed
- Change the link of ‘Howdy’ at the top right
- wp-admin pages return ERR_EMPTY_RESPONSE
- Options for restricting access to wp-admin
- Unwanted redirect in admin area
- Looking for a hook to add attachment information to the media library tab
- Removing admin bar from wordpress dashboard
- How to move wp-admin login page to another location? [closed]
- WP-admin giving 404
- How to control contextual help section by code?
- Can’t access wp-admin Internal Server Error 500
- File exceeds upload_max_filesize, despite max filesize being large enough
- Can’t access dashboard, connection times out (other pages work fine)
- Getting post meta data, while editing a post in wp-admin panel [closed]
- Add custom text to Page Tamplate without need to know html
- Move WP Admin Bar
- Get Stylesheet To Showup in WP Admin Panel Editor
- Deprecated : contextual_help has been deprecated since version 3.3.0
- Just how ‘expensive’ is this function?
- Custom Background-Image not showing up
- Remove query var on admin pages when ‘Save changes’ pressed
- admin_url in plugins
- Share Tags Between Custom Posts in Admin
- Filter dropdown in users.php “delete user” bulk edit screen
- Cannot find an OLD Gravity Form on an OLD Word Press site [closed]
- cannot find the login page for local WordPress site
- Disable wordpress reordering functions in backend screen element
- transition_post_status not working via Quick Edit
- Drafts widget for admin page
- how to customize wp-admin page using child theme
- Enque script based on url paramater
- new subdomain to apply as main domain
- WordPress server change – slow admin login time for first time
- I can´t access my admin panel. I tried all possible solutions
- Blank page for wp-admin after i uploaded the website from my localhost to the live server
- Ajax solution similar to WP Categories functioning in Admin area
- Difference between admin and user admin
- Hooks: admin_footer and admin_print_footer_scripts not working?
- Editing edit-tags.php page in wp-admin
- What is the correct way to get only display plugin for Administrator Only
- displaying an error before update_post_meta
- firing function at login within class
- Browse Happy in 3.2
- How to break line / add to ADMIN menu
- Adding Notification Bubble on Admin Top Bar
- WordPress admin page not found error
- Outputting something based on the presence of post variable in admin screens
- Use of domain name
- “Add New” button on custom post type grid
- Where is function to prevents non logged users access wp-admin?
- Registering for a domain on WordPress
- WordPress site stopped working after simply opening header.php in the wp-admin editor
- CSS of the admin panel
- Ajax requests from front-end with jQuery Fancybox
- Dismiss Admin Pointer Temporarily
- WordPress admin right sidebar isn’t working
- WordPress menu to change page title
- wp-admin blocking causing http error on uploads
- Disable some features in Admin
- DISALLOW_FILE_EDIT is false but I still am not able to edit files from the admin interface and the menus do not show up
- Don’t run code if in customizer or privew
- What hooks should you use to create a table only once?
- Custom admin menu order fails if slugs are complicated
- Redirect WordPress login for customers but not admin
- Cant access wp-admin
- Function to get a ‘post selector’ UI?
- Unable to open specific posts on WP Dashboard [duplicate]
- How to list newly ftp added HTML webpage under Pages section of wp-admin?
- Hi everyone, I have Problem with using wp_die()
- WordPress wp-admin Page
- How can I trigger a javascript function after a post update on edit post screen in wordpress admin panel?
- restrict admin panel sections to users
- how to set not to be logined in wp-admin except administrator?
- CSRF attack to create USER
- Disable flyout (popup) menus in backend
- WordPress, content editor default type
- Random HTTPs redirections at admin area in shared hosting
- WordPress Login for multiple sites
- How do I change the WordPress Address URL only and still login to wp-admin
- wordpress wp-admin showing white screen with no error
- Blank sign in page
- add_post_meta displays in admin edit area
- Forcing WordPress Administration onto a separate SSL Host
- How to prevent Google adsense invalid impressions while performing admin tasks on my wordpress site?
- Action for opening edit page in admin?
- What is the point of new confirm admin email process?
- ‘Too many redirects’ error after changing site URL in WordPress [closed]
- Couple questions about .htaccess, login page, updates
- Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?
- 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