• Trusted by:

Hire WordPress developers and engineers

Christos Melas, Greece

Member since August 5, 2015
Christos is a full-stack software engineer and architect with over 12 years of work experience in programming. He has designed and implemented enterprise-scale distributed information systems with JEE architectures of multi-node application servers and web stack technologies for the front-end. His latest projects are publicly accessible scaling to hundreds of thousands of users. He is fond of innovation and researches cutting-edge technologies. Click to continue

Benjamin Knight, United States

Member since November 13, 2014
Benjamin is a web designer and developer with experience across the web stack beginning in his early teens before web standards. He codes with an eye towards providing a quality user experience and interaction, and enjoys making creative decisions. He loves Python and JavaScript (the good parts) and has worked in a variety of environments, from a large engineering team to a smaller startup and independent freelance work. Click to continue

Flavio Escobar, Brazil

Member since April 23, 2014
Flavio is a top developer and an aspiring entrepreneur. He has extensive experience and skills with web and game development and is also proficient with mobile applications. He is a master of PHP, JavaScript, and ActionScript. Click to continue

Alan Heric, Croatia

Member since February 27, 2014
Alan is a talented developer with a proven ability to develop scalable, efficient, and bug-free web solutions. He is technically skilled, passionate about his work, and goal-oriented. Click to continue

Jason Funk, United States

Member since June 12, 2015
Jason is an experienced web developer with a broad range of both professional and personal technical achievements. He is the founder of Tough Space Consulting, a cloud-based business software consulting company that has helped a number of clients become more efficient and save money by improving their internal business processes. Jason is a strong team player yet at the same time enjoys taking on personal challenges. Click to continue

Petar Smolić, Croatia

Member since October 1, 2015
Petar has over 4 years of experience as a full-stack PHP developer. He mostly works with PHP frameworks and develops WordPress sites. He's an extremely fast learner, adaptable to new enviroments. Recently, he's started to switch his focus to Node.js. Click to continue

André Gumieri de Freitas, Brazil

Member since March 24, 2016
André is a senior front-end web developer with 13 years of experience. During his career, he has worked with projects ranging from basic design all the way to large development efforts. As a professional, André is considered pixel perfect when it comes to UI and has great knowledge architecting web projects. Click to continue

Max Loginov, Russia

Member since February 23, 2016
Max is an experienced engineer with a scientific background and 19 years in development, QA, and management in IT. He has worked for a number of world-recognized companies and has proven himself to be a polymathic problem solver who always delivers high quality solutions that thoroughly address customer needs. His experience with various tech gives him the ability to quickly integrate into any project and work out the best solution possible! Click to continue

Carlos Minatti, Argentina

Member since January 15, 2013
Carlos is fanatic about Internet and communication technologies and finding ways to help people solve daily problems. He has a host of experience building web and Android applications, and always aims to deliver the best possible user experience. Click to continue

Marcelo Mazza, Argentina

Member since April 14, 2015
Marcelo has been working for more than 10 years in User Experience (UX). He has solid knowledge of mobile platforms, UX, usability, design, front-end development, and WordPress, in addition to excellent interpersonal skills. He has proven experience in project management and strong organizational and planning skills, coordinating deliverables with prioritization of tasks according to the needs of each business. Click to continue
WordPress Resources
Trustpilot
Toptal on TV
"Toptal is killing it, it kind of owns this market."
Andrew Ross Sorkin Reviews Toptal
Cnbc 02e66b
"Tech companies simply cannot find the quality employees they want to hire. The solution: Toptal."
Liz Claman´s Review of Toptal
Fox 7ef901
Toptal in the press
“Despite accelerating demand for coders, Toptal prides itself on almost Ivy League-level vetting.”
Selina Wang
“Toptal allows corporations to quickly assemble teams that have the right skills for specific projects.”
Steven Norton
A hiring guide
The Vital Guide To WordPress Interviewing

Currently, WordPress is one of the most popular Content Management Systems. Clients love it because it’s easy to set up, there are a variety of plugins, and it has a user-friendly approach. Developers like it because of its understandable functionality, which means it’s easy enough to set up yet still gives decent quality. As a result, the number of sites using WordPress is growing, and it’s becoming more important than ever to be able to separate great WordPress developers from the rest of the pack. In this WordPress Hiring Guide, we cover the most important questions and answers that will help you determine whether your candidates are suitable for your hiring needs.

Testimonials
“It has been wonderful to work with Fabian for the past two years. He is an expert in JavaScript development and has built our embeddable widget and video player. He is a quick study and is able to learn how to integrate new technologies, which is so critical for a startup. He even took the extra effort to teach others on the team. He is super responsive and often went above and beyond to help us meet deadlines (including working on weekends). Thank you Fabian. Thank you Toptal for making it so easy to find and work with amazing talent.”
Natasha Mohanty
CTO @ FEM Inc
“My experience with Toptal has exceeded expectations. I needed to quickly find a front-end developer, and the first person they recommended was a perfect fit. A month later, I needed an iOS developer and they delivered again. I'm incredibly impressed with the quality of the people in Toptal's network and how quickly I was able to find a match for my needs. Greco is an amazing web developer. He has great attention to detail, in such a way that his websites look just like the design mockups we created on Photoshop. Not only that, but his code is very organized, and he proved to be very skilled in React.js. I couldn't have been happier with his contributions to our company. Vadim is a very experienced software engineer, particular in iOS. He was able to help us build our mobile app in record speed, and also contributed to major mobile and architecture decisions. Vadim is a proactive and intelligent engineer and has impressed us from day one.”
Bruno De Martino
Head of Product @ Token
“I am more than pleased with the experience with Toptal. It may cost a little more, but because they pre-qualify and hand-pick the professional best suited for the job, it's well worth it. The professional I got to work with was on the phone (Skype) with me within a couple hours. I knew after discussing my project with him that he was the candidate I wanted to do the job, and I hired him immediately... and he wasted no time in getting to my project. He completed the job and went the extra mile to clean up older, messy code and even added some great design elements that enhanced our overall look. I would highly recommend Toptal to anyone needing to hire a professional. Great company. Great service. Thank you, Toptal.”
Paul Fenley
Director @ K Dunn & Associates
“Getting set up with Toptal and finding a new team member was so easy, I don't know why anyone wouldn't give it a try. Best of all, we no longer have to worry about finding great people to help with our projects!”
Mike Branch
President & CTO @ HarborSI
“Toptal understood our project needs immediately. We were matched with an exceptional freelancer from Argentina who, from Day 1, immersed himself in our industry, blended seamlessly with our team, understood our vision and produced top-notch results. Toptal makes connecting with superior developers and programmers very easy.”
Jason Kulik
Co-Founder @ ProHatch
“We had a great experience with Toptal. They paired us with the perfect developer for our application and made the process very easy. It was also easy to extend beyond the initial time frame, and we were able to keep the same contractor devoted to the project. We definitely recommend Toptal for finding high quality talent quickly and seamlessly.”
Ryan Morrissey
CTO @ Applied Business Technologies, LLC
“Toptal is a great resource for startups with ever changing product roadmaps and budgets. We had highly skilled and reasonably priced Toptal developers working for us within 8 business days of our first conversation with Toptal. It has been an empowering experience for our company to start working with Toptal.”
Chris Clark
CEO @ ModernStat Labs
“We recently launched our app with the help of Toptal and Nikola, an iOS developer. I was immediately impressed with the constant communication, detail, and level of talent that Nikola brought to the table. More importantly, when the project was underway, Nikola proactively provided creative workarounds for unforeseen hurdles and challenges. I couldn't be happier with our engagement and would highly recommend Nikola and Toptal.”
Chip O'Toole
Founder @ Humans Helping Robots LLC
“As an internet marketing company specializing in pay-per-click management, our clients frequently ask us to provide services that fall outside the scope of our primary business. We have found Toptal to be exactly the resource we need to connect with contractors so we can deliver our clients top tier web development talent at a reasonable cost.”
Pashmina Lalchandani
Owner @ Flowsimple
“I couldn’t have been more pleased with Toptal. These guys are professional, quick, well priced, and fun! I will be using them again for my next project, and the next, and the next, and the next.”
Mac Smith
President @ New Texas Internet MGT
“The developers I was paired with were incredible—smart, driven, and responsive. It used to be hard to find quality engineers and consultants. Now it isn't.”
Ryan Rockefeller
CEO @ Radeeus
“As a growing startup, finding top-notch engineering talent at affordable rates is one of the biggest challenges. After being frustrated with unreliable local contractors in New York, we turned to Toptal. We worked closely with Michal in Poland for 5 months and were thrilled with the results. Michal was an outstanding engineer who communicated flawlessly and took control of our project in ways that far exceeded my expectations. I give Michal and Toptal my highest endorsement and will continue to use and recommend them to anyone looking for software engineering talent.”
David Baker
Founder @ Spins.FM
“My business relationship with Toptal has been nothing short of terrific. From reviewing my project with their team to choosing a highly-talented developer, and all the way through releasing our application, it has been an incredibly smooth and successful experience.”
Gary Craig
Senior Analyst @ NetApp
“Working with Enrique has been a pleasure and a relief. His knowledge in the IT space is broad and in-depth. Zoomedia has been in need of this level of support for some time and I feel confident we are an exponentially stronger team with Enrique on board.”
Justin Bane
Senior Technical Lead @ Zoomedia
“I'm incredibly impressed with the caliber of the Toptal developers I have worked with - they have proven themselves to be both dedicated and highly talented. We will most definitely continue to work with Toptal. ”
Savannah de Savary
Founder @ Industry Hub
Hire a top WordPress developer now.
Toptal is a marketplace for top WordPress developers, engineers, programmers, coders, architects, and consultants. Top companies and start-ups choose Toptal freelancers for their mission critical software projects.
Full
profile
Christos MelasGreece
Christos is a full-stack software engineer and architect with over 12 years of work experience in programming. He has designed and implemented enterprise-scale distributed information systems with JEE architectures of multi-node application servers and web stack technologies for the front-end. His latest projects are publicly accessible scaling to hundreds of thousands of users. He is fond of innovation and researches cutting-edge technologies.
[click to continue…]
WordPressJavaScriptSQLJavaCSSEmber.jsBootstrapjQuery
Hire
Full
profile
Benjamin KnightUnited States
Benjamin is a web designer and developer with experience across the web stack beginning in his early teens before web standards. He codes with an eye towards providing a quality user experience and interaction, and enjoys making creative decisions. He loves Python and JavaScript (the good parts) and has worked in a variety of environments, from a large engineering team to a smaller startup and independent freelance work.
[click to continue…]
WordPressHTML5PythonCSSPHPJavaScriptBootstrapjQueryResponsive Web Design (RWD)
Hire
Full
profile
Flavio EscobarBrazil
Flavio is a top developer and an aspiring entrepreneur. He has extensive experience and skills with web and game development and is also proficient with mobile applications. He is a master of PHP, JavaScript, and ActionScript.
[click to continue…]
WordPressSQLCSS3JavaScriptCSSPHPSQL-99BootstrapjQueryMySQL WorkbenchAdobe Flash BuilderjQuery File UploadAJAX
Hire
Full
profile
Alan HericCroatia
Alan is a talented developer with a proven ability to develop scalable, efficient, and bug-free web solutions. He is technically skilled, passionate about his work, and goal-oriented.
[click to continue…]
WordPressCSS3HTML5CSSBootstrap 3.0jQueryAdobe DreamweaverAdobe PhotoshopMac OS XWindows 7
Hire
Full
profile
Jason FunkUnited States
Jason is an experienced web developer with a broad range of both professional and personal technical achievements. He is the founder of Tough Space Consulting, a cloud-based business software consulting company that has helped a number of clients become more efficient and save money by improving their internal business processes. Jason is a strong team player yet at the same time enjoys taking on personal challenges.
[click to continue…]
WordPressPHPSQLJavaScriptMySQL
Hire
Full
profile
Petar SmolićCroatia
Petar has over 4 years of experience as a full-stack PHP developer. He mostly works with PHP frameworks and develops WordPress sites. He's an extremely fast learner, adaptable to new enviroments. Recently, he's started to switch his focus to Node.js.
[click to continue…]
WordPressJavaScriptPHPLESSHTML5GitMySQL
Hire
Full
profile
André Gumieri de FreitasBrazil
André is a senior front-end web developer with 13 years of experience. During his career, he has worked with projects ranging from basic design all the way to large development efforts. As a professional, André is considered pixel perfect when it comes to UI and has great knowledge architecting web projects.
[click to continue…]
WordPressCSS3JavaScriptHTML5CSSAPIjQueryGitFront-endCSS3 Animation
Hire
Full
profile
Max LoginovRussia
Max is an experienced engineer with a scientific background and 19 years in development, QA, and management in IT. He has worked for a number of world-recognized companies and has proven himself to be a polymathic problem solver who always delivers high quality solutions that thoroughly address customer needs. His experience with various tech gives him the ability to quickly integrate into any project and work out the best solution possible!
[click to continue…]
WordPressPHPJavaJavaScriptSQLC/C++React.jsNode.jsjQueryMySQL
Hire
Full
profile
Carlos MinattiArgentina
Carlos is fanatic about Internet and communication technologies and finding ways to help people solve daily problems. He has a host of experience building web and Android applications, and always aims to deliver the best possible user experience.
[click to continue…]
WordPressJavaScriptPHPSQLBootstrapjQueryGitMySQL
Hire
Full
profile
Marcelo MazzaArgentina
Marcelo has been working for more than 10 years in User Experience (UX). He has solid knowledge of mobile platforms, UX, usability, design, front-end development, and WordPress, in addition to excellent interpersonal skills. He has proven experience in project management and strong organizational and planning skills, coordinating deliverables with prioritization of tasks according to the needs of each business.
[click to continue…]
WordPressCSSBootstrapBootstrap 3.0Twitter BootstrapUser Interface DesignUser Experience (UX)UX Design
Hire

The Vital Guide To WordPress Interviewing

The Challenge

Currently, WordPress is one of the most popular Content Management Systems (CMS). It may be used to create a personal blog, internet shop, landing page, corporate website and more. Clients love it because it’s easy to set up, there are a variety of plugins and, overall, it has a user-friendly approach. Developers like it because of its understandable functionality, which means it’s easy enough to set up yet still gives you decent quality.

The number of sites using WordPress is growing, which is creating a demand for a significant number of WordPress developers. So, how do we distinguish a novice from an experienced WordPress developer? In this guide, we suggest questions and answers that will help you determine the level of skills your candidate has.

Why spend money and time building website from scratch, when you can hire top WordPress developer and save?

Why spend money and time building a website from scratch, when you can hire top WordPress developer and save?

Questions and Answers

Q: Discuss how to setup a custom theme, name the minimum required files, and explain how WordPress recognizes a new theme.

Every WordPress site requires a theme; it is how it is structured and is, therefore, an integral part of the site.

The new theme is created as follows: In the wp-content/themes/ directory, create and name a new folder. Best practice is to use the name of the company for which you are making the website. Use lower case (Roman alphabet) without spaces. Note that you need to put in the theme folder these five files: style.css, functions.php, index.php, header.php and footer.php. Later, you can extend the theme with other custom files.

The formation of the style.css file header is a part of the base theme settings. With the help of file style.css and headers in it, WordPress’s core will recognize your folder as the new theme.

The beginning of the style.css should be as follows:

/*
Theme Name: [theme name]
Author: [author name]
Author URI: [author URL]
Version: [theme version]
Description: [theme description]
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

If you create a child theme, you need to add another line where the base theme is indicated.

Template: twentyfifteen

Where twentyfifteen is the name of the main (parent) folder theme.

Q: Explain how WordPress generates a page.

WordPress recognizes and analyzes the request entered in the URL bar, picks the best PHP file, and generates the webpage. It makes a global object $wp_query based on the request in the URL. Then, with the help of its functions, WordPress loads other files, such as header.php, footer.php, and sidebar.php.

Check the template hierarchy scheme, which defines the process and file that will output the content of the current query.

For example, if the address is /? Cat = 1, WordPress will first look for category-slug.php file. If the file is not found, it will search the category-id.php file. If this can’t be found, either, it looks for the file category.php, and so on, until it finds the appropriate file. If it can’t find one, it simply selects the index.php file.

Q: Explain the semantics of a theme’s development and the basic principles of a good theme. What should be kept in the theme files?

Here are some of WordPress’s best practices and recommended principles for creating a new theme:

  • The function wp_head() must be in the header.php file.
  • The function that operates classes, must be in the header.php file, inside the body tag: <body <php body_class ();? ? >>
  • The function wp_footer() must be in the footer.php file.
  • If you have a repeating functionality, this code must be put into separate function, and this function must be added to the functions.php file.
  • In all files, except header.php and the footer.php, the number of opening HTML tags must be equal to the number of closing tags.
  • If the file contains duplicate pieces of HTML code, it is better to unite them in a single file, put it in a theme subfolder, which can be named blocks or whatever you need, connect this piece of code, and call the function get_template_part( 'blocks/[name-of-the-file.php]' );.
  • File index.php is the final file to process the request, so it needs to have the main loop minus any queries. That means it will be impossible to alter the main loop in index.php.
  • All the theme settings must be in the functions.php file: actions, filters, custom functions, and custom classes. Although classes and functions may be located in different files, and be connected to the main functions.php, or be placed in a separate plugin.
  • The code should not contain commented code. Commenting as a description is allowed, but code chunks that have been used in the design, should be removed.
  • Code in the files should be structured with the aid of indents.
  • Themes must be validated by the w3c standards.
  • The theme should work without exterior plug-ins. For example, if we use the WP-PageNavi plugin, you must write:
if (function_exists ( 'wp_pagenavi')):
    wp_pagenavi ();
else:
    get_template_part ( 'blocks / pager');
endif;
  • If the code uses functions or plugins classes, make sure the function or class exists:
if (function_exists ('name_of_the_function'))
  • For direct requests to the database, you must use the class $wpdb and its methods.
  • If you use the form and need to create an options page admin panel, you must use wp_nonce_field(), and on the server side check this field and action:
<?php

if ( ! isset( $_POST['name_of_nonce_field'] ) || ! wp_verify_nonce( $_POST['name_of_nonce_field'], 'name_of_my_action' ) 
) {
   print 'Sorry, your nonce did not verify.';
   exit;
} else {

   // process form data
}
?>

/* some code is here*/

<form method="post">
   <!-- some inputs here ... -->
   <?php wp_nonce_field( 'name_of_my_action', 'name_of_nonce_field' ); ?>
</form>
  • If some files are not used, remove them from theme folder. If a client doesn’t need to use “search” on his site, remove searchform.php from the theme folder.
  • Functions that begin with the _ must only be written in the loop. And in the loop, if possible, use the functions started with the _ for presenting display fields.

Q: Explain how to create a custom page template.

For custom page templates, it is better to create a separate folder; do not mix custom templates with existing WordPress templates. Place the custom template file into this folder. At the beginning of the file you need to add the following code:

<? Php
/ *
Template Name: [Template_Name]
* /
get_header (); ?>

Q: Explain how to include your CSS and JavaScript files into the theme or plugin correctly.

You can use <link> or <script>, but the correct way is to connect them in the functions.php file. You need to add action to wp_enqueue_scripts, and our action is to connect JavaScript and CSS files:

function theme_scripts_styles () {
    // Connection of a custom JS file after jquery library that will be  connected independently by WordPress
    wp_enqueue_script ( 'theme-script', get_template_directory_uri () '/js/jquery.main.js', array ( 'jquery').);
 
    // Loads default theme style.css.
    wp_enqueue_style ( 'theme-style', get_stylesheet_uri (), array ());
    
    // Connection of a custom css file
    wp_enqueue_style (. 'theme-theme', get_template_directory_uri () '/theme.css', array ());
}
add_action( 'wp_enqueue_scripts', 'theme_scripts_styles' );

Q: Explain how you make a custom menu and how you display that menu on the page.

To display the menu, you must:

  • Select the location for ther menu in the functions.php:
register_nav_menus (array (
 	'Primary' => __ ( 'Primary Navigation'),
));
  • Use this location to display a menu:
if (has_nav_menu ( 'primary'))
 	wp_nav_menu (array (
	...
	'Theme_location' => 'primary',
	...
	)
 	);

Menus are placed on a page via the admin panel, which also allows other pages to have menus (with the same look) placed in the same location.

Custom settings can be made through parameters wp_nav_menu() function, but should you need to create a custom menu, do this:

  1. Create inheritance class from Walker_Nav_Menu, where you can write your custom functionality: class Custom_Walker_Nav_Menu extends Walker_Nav_Menu {...}.
  2. When displaying the menu, add another parameter walker:
if( has_nav_menu( 'primary' ) )
	wp_nav_menu( array(
        	 ...
        	 'theme_location' => 'primary',
        	 'walker'       	=> new Custom_Walker_Nav_Menu
        	 ...
        	 )
	);

Q: Explain what a loop is and how it works.

Loop means “cycle” from which WordPress generates the page content. If there is a single page, for example, page.php or single.php, the cycle remains with the template, but it will be realized only once. If you have search.php, archive.php or the index.php, the cycle will take place as many times as necessary to satisfy the request, which depends on the query URL, and consequently, on how the object is formed wp_query. Loop runs for posts in the global $wp_query object.

Q: Explain the difference between functions that begin with the_ and other functions.

Functions starting with the_ are intended to be used in the loop. Note they can’t be used out of the cycle.

Q: Explain custom post types; why do we use them, and how can we create them?

Custom post types are needed to break content logically. For example, we want to list all the sales managers in a company, so that customers may contact them directly from our website. Say, we have about 20 people in the sales department, and at any time, one of them might quit or someone new might join. So, for this task, the most logical action is to create the post type Team and in the template list everybody who is in the post type Team.

A simple example of the creation of a custom post type:

add_action( 'init', 'theme_create_post_type' );
function theme_create_post_type()
{
        	register_post_type( 'team',
	    	array(
        	        	'labels' => array(
                            		'name' => __( 'Team' ),
                            		'singular_name' => __( 'team' ),
                        	    	),
        	        	'publicly_queryable' => true,
        	        	'public' => true,
'show_ui' => true,
        	        	'hierarchical' => false,
        	        	'menu_position' => null,
        	        	'query_var' => true,
        	        	'supports' => array('title','editor','thumbnail','custom-fields','comments')
    		)
        	);
}

Custom post types are created at the action init. Therefore, you need to create action and name it register_post_type() in function with the desired set of parameters.

Q: Explain how to get posts from custom post type and custom taxonomy.

For example, we have a post type Team and taxonomy Department, and in a custom taxonomy, we have the term Managers. Our task is to display all the managers.

Provided the “slug” of the term Managers in custom taxonomy Department is equal to Managers, we can utilize WP_Query class, like this:

$args = array(
        	'post_type' => 'team',
        	'tax_query' => array(
                    	array(
                                	'taxonomy' => 'department',
                                	'field'	=> 'slug',
                                	'terms'	=> 'managers',
                    	),
        	),
);
$query = new WP_Query( $args );

Q: Explain shortcodes and provide few examples.

Shortcodes are keywords used to create macros that can be used later in a post’s content. In WordPress, they are enclosed in square brackets []. Shortcodes can be used either in the content editor’s post or in a pattern, if you apply do_shortcode() function. The simplest example is when a client does not know HTML, but it is necessary to insert something in the content of the posts.

In WordPress, we can create three types of shortcodes. However, because they can be configured in different ways, shortcodes have unlimited possibilities. It is important to note that the shortcode processing function must return the value, not display it. For example, if we need to display the phrase “Hello World”, we would write in functions.php something like the following:

function hworld_func( $atts ){
        	return ‘<div class=”block-wrapper”><div class=”block”>Hello world</div></div>’;
}
add_shortcode( 'hworld', 'hworld_func' );

To get the shortcode to work, we need to insert [hworld] into the post content.

If we have to adjust the shortcode from the admin panel, we can add parameters to it, like this: [hworld cssclass = "red"].

A code in the functions.php will be as follows:

function hworld_func( $atts ){
        	return ‘<div class=”block-wrapper ’ . $atts[‘cssclass’] . ’”><div class=”block”>Hello world</div></div>’;
}
add_shortcode( 'hworld', 'hworld_func' );

Also, as well as the parameters, we can handle the text itself. To do that, the shortcode should look like this: [hworld cssclass = "red"] Hello world [/ hworld].

The functions.php will then look like this:

function hworld_func( $atts, $content ){
        	return ‘<div class=”block-wrapper ’ . $atts[‘cssclass’] . ’”><div class=”block”>’ . $content . ’</div></div>’;
}
add_shortcode( 'hworld', 'hworld_func' );

Q: Describe how to make a widget. Explain primary widget functions.

In WordPress, you can create custom widgets by creating a class that inherits basic functions from WP_Widget class.

The primary functions of the widget class:

  • __construct(): Constructor of the widget, it will add a widget to the admin panel.
  • widget($ args, $ instance): Displays the content on the front-end based on the function arguments. $ args are widget arguments which are set in the sidebar to wrap a widget. $ instance are parameters of the widget, which can be configured in the admin area.
  • update($ new_instance, $ old_instance): A feature that saves the new widget options, if they have been changed by the administrator in the admin panel.
  • form($ instance): Creates a widget settings form in the admin panel on the page widgets.php.

The final thing to make the widget work is on the action widgets_init attach function that will record (register) it:

add_action ( 'widgets_init', create_function ( '', 'return register_widget ( "CustomWidget");'));

Widget example:

class CustomWidget extends WP_Widget {
 
	function __construct() { ... }
 
	function widget( $args, $instance ) { ... }
 
	function update( $new_instance, $old_instance ) { ... }
 
	function form( $instance ) { ... }
}
add_action( 'widgets_init', create_function( '', 'return register_widget( "CustomWidget" );' ) );

Q: Explain what actions and filters are. Discuss their differences, and how and when to use them.

You can not change WordPress core files and plugins. However, sometimes we need to change default core behavior, which is when actions and filters come to the rescue.

They work almost identically, the only difference is that functions that are imposed on the filters return a value, while actions do not. So, filters change some content or meaning, which would later be used by the core or plugin.

Here’s an example of a filter that must be written in the functions.php:

add_filter(‘the_content’, ‘theme_the_content’);
function theme_the_content($content){
        	return ‘<div class=”contentwrap”>’ . $content . ‘</div>’;
}

This means that somewhere in the core code or plugin there is a line similar to this:

$content = apply_filters(‘the_content’, $content);

So, the variable $content is the second parameter that’s sent to theme_the_content() function. It may also look like the following code:

$var = apply_filters(‘some_filter_name’, $var1, $var2, $var2);

In this case, you need to write in functions.php:

add_filter(‘some_filter_name’, ‘theme_some_filter_name’, 10, 3);
function theme_the_content($var1, $var2, $var2){
        	return [SOME_CODE];
}

In the filter function, number 10 can be any integer that indicates the priority of this filter, if such filters will be several, and number 3 is a number of variables that come into function.

add_action( 'init', 'theme_create_post_type' );
function theme_create_post_type()
{
        	register_post_type( 'team',
	    	array(
        	        	'labels' => array(
                            		'name' => __( 'Team' ),
                            		'singular_name' => __( 'team' ),
                        	    	),
        	        	'publicly_queryable' => true,
        	        	'public' => true,
        	        	'show_ui' => true,
        	        	'hierarchical' => false,
        	        	'menu_position' => null,
        	        	'query_var' => true,
        	        	'supports' => array('title','editor','thumbnail','custom-fields','comments')
    		)
        	);
}

Parameters may be passed to both actions and filters. If we do not need the filter or action, we can remove it. For example:

remove_filter ( 'some_filter_name', 'theme_some_filter_name', 10);
remove_action ( 'init', 'theme_create_post_type');

Q: Discuss different ways of integrating plugins into a theme. Explain correct ways of doing it.

Plugins can be integrated in many ways:

  • Through actions and filters.
  • Through shortcodes.
  • Through widgets.
  • Through a PHP function.

If the plugin is integrated with the aid of PHP code, you should check for the existence of a function:

<?php if(function_exists('bcn_display')) bcn_display(); ?>

It is important to check the theme’s ability to work without plugins, so that when the plugin is deactivated the theme will keep working. For example, if we use the plugin WP_PageNavi, we should write code like this:

if(function_exists('wp_pagenavi')):
	    	wp_pagenavi();
else:
	    	get_template_part( 'blocks/pager' );
endif;

That means when you turn off the plugin, the theme will continue to operate while maintaining a functional page. However, it will be a standard page, not one that would show with the use of the plugin.

Q: Describe the steps to create a simple plugin.

The plugin is an addition; it is an expansion of WordPress’s functionality. To create a plugin, you first need to create a folder in the wp-content/plugins directory, using lower case, Roman alphabet, and no spaces. Inside this folder, you need to create a file with the same name as the folder using the extension .php. This will be the main file. Additionally, create an empty index.php file to hide the list of files and catalogs.

At the beginning of the main file, add predefined metadata lines through which WordPress understands that it is a plugin:

<?php
/*
Plugin Name: [PLUGIN NAME]
Description: [PLUGIN NAME DESCRIPTION]
Version: [PLUGIN VERSION]
Author: [PLUGIN AUTHOR]
Author URI: [PLUGIN URL]
License: GPL2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

Designing (creating) plugins with classes is recommended. So, an example of a plugin’s code structure might be like this:

<?php
/*
Plugin Name: TestPlugin_Name
Description: TestPlugin_Name description.
Version: 1.0.0
Author: evgen@toptal.com
Author URI: https://www.linkedin.com/in/evgengavrilov
License: GPL2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
class TestPlugin {
	
	[CODE IS HERE]
	
        	function TestPlugin(){
        	 [CODE IS HERE]
        	}
	
        	[CODE IS HERE]
 
}
$testplugin = new TestPlugin();

Remember the rules of creating a theme: Media may only connect through action wp_enqueue_scripts, and the plugin must not contain any errors.

Q: Explain the role of child themes. How do you make a basic child theme?

Child themes are necessary when you need to change styles and functions of the main, or parent, theme but without changing its code. It’s like Object Oriented Programming: a class and its derived class. The inheritance does not break the parent, but it can change existing methods and add new ones.

A child theme may be created quickly and easily in a few steps:

  1. Create a folder inside the wp-content/themes with the name [name-of-parents-folders-theme]-child.
  2. Inside the folder, create styles.css file and to the main header file, add another line: Template: [name-of-parents-folders-theme].
  3. Create a functions.php file.

Thus, we can alter the styles of the parent theme by adding to our child folder template files. WordPress will use these files, and, if necessary, other files will be used from the parent theme folder.

Q: Explain a WordPress network, and how to create one.

WordPress network is a way of managing multiple sites through a single admin panel. The main difference in roles of Administrator and Super Administrator is that the Super Administrator can manage the network (Multisite).

The network can be made on any WordPress website. Although this functionality is integrated, by default, it is not activated.

To create a network:

  1. At the end of the wp-config.php file, write a line: define ( 'WP_ALLOW_MULTISITE', true);
  2. Refresh the Admin panel, and Subparagraph “Network Setup” should appear in the Tools menu. Click on it and go to the installation page. Fill in the fields created by WordPress.
  3. Next, you will be transferred to the page settings that should be copied to wp-config.php and .htaccess files. Simply copy the suggested code, and paste it into the appropriate file.
  4. When the files are changed, remember to logout of the Admin panel to allow a user to create and manage the network’s websites.

Conclusion

We hope you find the questions and answers in this post to be a useful foundation as you search for great candidates among the few elite WordPress developers. Finding such candidates is well worth the effort, as they will undoubtedly have a significant, positive impact on your team’s productivity.

Hire WordPress developers now
Alvaro 1506e7

My team is going to personally help you find the best candidate to join your team.

Alvaro Oliveira
VP of Talent Operations