WordPress Developer Ukraine, Kyiv
How to Create Your First Gutenberg Custom Block

How to Create Your First Gutenberg Custom Block

Create your first custom block for the WordPress block editor Since WordPress 5.0 the editor is built from blocks, and a plugin or theme can add its own. A block is registered in JavaScript with registerBlockType(): the edit function describes how it looks and works in the editor, the save function returns the HTML that…
WordPress 5.0 and the Block Editor: What You Need to Know

WordPress 5.0 and the Block Editor: What You Need to Know

WordPress 5.0 and the block editor: what changes for developers WordPress 5.0 was released on December 6, 2018, and the new block editor, developed as the Gutenberg plugin, is now the default editor. Instead of one big text field, the content is a sequence of blocks: paragraphs, headings, images, galleries, buttons. For site owners it…
How to Handle AJAX Requests in WordPress with wp_ajax

How to Handle AJAX Requests in WordPress with wp_ajax

Handle AJAX requests in WordPress with wp_ajax WordPress has its own AJAX entry point: every request goes to wp-admin/admin-ajax.php with an action parameter, and WordPress calls the PHP function registered for that action. All of WordPress is loaded, so in the handler you can use any function, check the user and work with the database.
How to Create Custom Page Templates in WordPress

How to Create Custom Page Templates in WordPress

Create custom page templates in WordPress Different pages often need different layouts: a full-width landing page, a contact page without a sidebar, a page with a list of team members. A page template is a theme file that the editor can choose for a single page in the admin, without any code on their side.
How to Register and Display Navigation Menus in WordPress

How to Register and Display Navigation Menus in WordPress

Register and display navigation menus in a WordPress theme Menus are one of the first things a theme sets up. The theme declares menu locations, the site owner builds menus in Appearance → Menus and assigns them to the locations, and the templates print whatever menu is assigned. The theme never hard-codes the links.
How to Query Posts by Custom Field in WordPress (meta_query)

How to Query Posts by Custom Field in WordPress (meta_query)

Query posts by custom field with meta_query Custom fields are often used for things you later want to filter by: the city of an event, its date, a “featured” flag. WP_Query can filter by them with the meta_query argument, from a simple equality check to ranges and several conditions combined with AND/OR.
How to Use wp_redirect and wp_safe_redirect in WordPress

How to Use wp_redirect and wp_safe_redirect in WordPress

wp_redirect() and wp_safe_redirect() in WordPress Redirects are an everyday task: after a form is sent, after login, when a page has moved, when a guest opens a page for members. In WordPress you do not call header( 'Location: ...' ) yourself; there are two functions for it, and the difference between them matters for security.
How to Add a Front-End Login Form in WordPress

How to Add a Front-End Login Form in WordPress

Add a login form to any page in WordPress Sending users to wp-login.php works, but on a membership site or an online shop it breaks the design: the visitor suddenly sees a different page with the WordPress logo. The login form can be shown on any page of the theme instead.