WordPress Developer Ukraine, Kyiv
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 Create a Custom Login Page in WordPress

How to Create a Custom Login Page in WordPress

Rebrand the WordPress login page without editing core files The default login page at wp-login.php works fine, but the WordPress logo and the link to wordpress.org look strange on a client’s site. WordPress has hooks for the logo, its link and its title, and a hook to load your own stylesheet on the login screen,…
How to Create a Custom Taxonomy in WordPress

How to Create a Custom Taxonomy in WordPress

Register a custom taxonomy for a post type WordPress has two built-in taxonomies for posts: categories (hierarchical) and tags (flat). A custom taxonomy works the same way, but you decide what it is called and which post types it belongs to: books by genre, portfolio items by technique, events by city.
How to Create a Child Theme in WordPress

How to Create a Child Theme in WordPress

Create a WordPress child theme in two files When you customise a theme by editing its files, every theme update overwrites your changes. A child theme solves this: it takes all templates and styles from the parent theme, and you keep only the files you change.
How to check it’s default page template?

How to check it’s default page template?

How to detect the default page template in WordPress This is a quick post. When you need to check which template a page is using, you’d normally call is_page_template(). But how do you detect that a page uses the default template, the one without a name in the Page Attributes box? There is no template…
How to change arguments of the global query on default pages

How to change arguments of the global query on default pages

Modify the global WordPress query on default pages pre_get_posts fires after the query variable object is created but before the database query runs. It gives you direct access to the $query object for every query WordPress makes, including the main loop, so you can change arguments without duplicating the template or creating a secondary query.