Articles of wp admin

how to add custom css and js on wordpress post editor directly without using .php file

I am trying to add some css and js code to my home page editor at the wp-admin. I am using simply <script type=”text/javascript”> jQuery(document).ready(function($) { $(‘.x-feature-box’).each(function() { var self = $(this), icon_href = self.find(‘.x-feature-box-text a:last-child’).attr(‘href’); if ( icon_href.length > 0) { $(self).find(‘.x-feature-box-graphic-inner > *’).wrap(function() { return ‘<a href=”‘ + icon_href + ‘” target=”_parent”></a>’; }); […]

WordPress Ajax Not Working ( Custom Admin page)

I tried to do a small thing using Ajax. I just try to replace a div. This is what I have done so far. I created a admin menu using add_menu_page. Then I add a form to that page with a text field. I just need to replace a div when click the submit button. […]

Adding a character counter to the excerpt metabox

We try applying an altered version of this (very popular) code in a custom-functions plugin. It was even mentioned at stackoverflow but the whole question was deleted since the user asking was removed. Here is a Google cached version. Closely modified code is still present. This is the altered code: // Add Character Counter to […]

What is the capability that permits access to WP-Admin?

This is a very simple question but I have made great effort to find it already addressed on the stack. Basically I’m creating a new user role for a freelance web developer and trying to figure out what allows them to log into wp-admin. Does anyone know which exact setting provides that access? I’ve been […]

Why isn't my email showing up as registered with WordPress anymore?

I can’t login to my blog anymore…I tried requesting a new password, but it is telling me that my email is not one that is registered. I definitely have an account and a blog, though.

How to regenerate thumbnails when they're stored on S3

I have a WordPress site that uses the WPRO (WordPress Read Only) plugin to host all media files on Amazon S3. I’ve changed the thumbnail and image sizes in my custom theme, and uploading new images to the media library uses the new sizes. However, when I try to regenerate all thumbnails using “Regenerate Thumbnails,” […]

Change the backend language of a single plugin

I’m managing a WordPress installation which main backend language is Italian, mostly due to the needs of the Authors and Editors. I found a plugin that functionally fits my needs perfectly, but it gets installed with Italian localization by default, which translation of the backend is really poor at the moment to the point of […]

Global State During an Admin Post

I recently converted some old WordPress code over to using the admin-post.php mechanism. add_action( ‘admin_post_myaction’, function(){ //…my code to do stuff here… //redirect back to the main page $url = menu_page_url( ‘my_original_menu_item’, false ); wp_safe_redirect( $url ); } ); As you can see in the above simplified code sample, once I’m done handling my post, […]

How to create a WP Admin user in phpMyAdmin for WordPress 4.6

I have a WP 4.6 site with an admin user which is unable to access /wp-admin, receiving the error (on a white screen): Sorry, you are not allowed to access this page. I had uploaded a designer’s full site SQL export into phpMyAdmin (after find and replacing the host name from old to new). I […]

Modify action buttons for custom post type

I have created a custom post type called “form-enquiry”. I’m trying to change the actions that appear when the admin hovers over the posts on the edit.php page. See screenshot below I managed to find the array which was holding the settings and add my own custom one called “reply” into the array. However, I […]