Scripts and Actions for WordPress

Change the text set featured image in the admin panel

The code works great, I checked. Think, the method itself may be useful to someone, for example, when writing your own assembly WordPress and optimization of user experience “Usability”.

Creating a user right from the WordPress code

Attention user is created immediately, how do you paste the code in your theme's functions.php file and update the site itself. Code can be useful for plugin development.

Attention check the code is not on the current site, so as not to accidentally create extra users and not litter your site with extra accounts.

Checking if the plugin is active or not in the plugin code, which you are developing.

Turn off the visual editor for posts and pages when editing them on the blog. Code checked, everything is working, just add it to your theme's functions.php file.

Making Empty Categories Display in WordPress Widgets

As you already know, widgets WordPress categories do not allow displaying empty categories. Adding this snippet to functions.php your topic WordPress will force the system to display empty categories.

Removing the comments item from the admin bar

To remove a comment item from the admin bar, paste the code into the file functions.php your topic.

Move the author's metabox to the post block

Just a chic code to indicate the author of the publication of the article. In this case, you do not have to twist the screen to the very end.. Your author metabox will appear right above the publish button. For an action to work in WordPress need to add code, suggested below to your theme's functions.php file.

From the category directly to the article if there is only one article in the category

In previous lessons I showed, how to do search redirect, if the result is the same, which is very convenient for users. Today I will show you how to make a redirect for categories and redirect the user directly to an article from the list of articles in the category if there is only one article in the selected category.


Купить хостинг WordPress
/* WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal