5 WordPress Features You Probably Didn't Know About

Hidden deep inside the WordPress engine lies a ton of useful features that many developers don't even know about.. Many do not know about these functions, most likely because WordPress CODEX is underdeveloped and not everything is there, and even more so in Russian and Ukrainian.

Due to the great usefulness of such functions, I decided to post my favorite ones. . Some of them are very simple and can be used when developing your plugins., others may be used less frequently, but all these features are very useful.

wp_mail function ()

wp_mail - super easy feature to send mail. You can even send email with attachments.

You can read more about the wp_mail function in codex wordpress. You can also read there that the function has two additional parameters $headers and $attachments, they make it possible to set up email headers and attach a file.

wp_loginout function()

Adds a login link / Exit the page without the need to enter the admin panel. If you have not logged in yet, then at the place where the function was located, there will be an inscription Login, if you enter, then the inscription will change to Exit. Very handy if you don't want to manually type /wp-admin/ or /wp-login.php.

We add the function anywhere in the template like this <? wp_loginout(); ?>.

You can read more about the function in WordPress code.

clean_url functions() is esc_url()

Use esc_url () instead of obsolete clean_url(). The function makes the correct url addresses. For example, ampersand character converts to HTML special character. The function also knows how to add the missing http at the beginning of the url address. In a word, the function fixes poorly structured url addresses.

Read more about the function in WordPress code.

wpauto function()

The function is used to filter the full and brief content of the page, output by functions the_content and the_excerpt. I think the operation of the function is easy to understand with a simple example taken from wordpress code.

Code in the template:

Output code:

fetch_feed function()

Extracts the external channel and analyzes it. Uses SimplePie and FeedCache functions to retrieve, analysis and automatic caching. Deprecated analogue of the fetch_feed function() this is wp_rss().

Read more about the function in code engine.

Good luck with development.


Купить хостинг 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...

1 Response

  1. Veronica! says:

    I know, also that you can't wait to learn more about WordPress, but digress from the Code for now, step away from the computer and pick up a good old piece of paper, pen or pencil.

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