0% found this document useful (0 votes)
114 views

WordPress Interview Question Final

The document contains interview questions for a WordPress theme and plugin developer position. It includes questions about the WordPress loop, limitations of WordPress sites, types of hooks and their functions, custom fields, custom post types, securing a hacked site, preventing brute force login attacks, shortcodes, pagination links, nonces, and optimizing performance. It also includes code snippets and asks to explain what they do, identify issues, and rewrite snippets using object-oriented programming.

Uploaded by

Olindo Zaman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views

WordPress Interview Question Final

The document contains interview questions for a WordPress theme and plugin developer position. It includes questions about the WordPress loop, limitations of WordPress sites, types of hooks and their functions, custom fields, custom post types, securing a hacked site, preventing brute force login attacks, shortcodes, pagination links, nonces, and optimizing performance. It also includes code snippets and asks to explain what they do, identify issues, and rewrite snippets using object-oriented programming.

Uploaded by

Olindo Zaman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

ITclan BD - Interview Questions for WordPress Theme

& Plugin Developer

Section A:
1. What is WordPress loop?

2. Are there any limitations to a WordPress web site?

3. What are the types of hooks in WordPress and mention their functions?

4. What do you mean by custom field, Custom Post, Custom Page Template in
WordPress?

1
5. What are the steps you can take if your WordPress file is hacked?

6. Is WordPress safe from brute force login attempts? If not, how can you prevent such
an attack vector?

7. how to write the short code in WordPress php file?

8. What do next_posts_link() and previous_posts_link() do?

9. What is Nonce in WordPress?

10. How to optimize WordPress site performance?

2
Section B:
1. Consider the following code snippet. Briefly explain what changes it will achieve,
who can and cannot view its effects.

add_action('admin_menu', 'custom_menu');

function custom_menu(){
add_menu_page('Custom Menu', 'Custom Menu', 'manage_options', 'custom-menu-slug',
'custom_menu_page_display');
}

function custom_menu_page_display(){
echo '<h1>Hello World</h1>';
echo '<p>This is a custom page</p>';
}

Ans:

2. What is the $wpdb variable in WordPress, and how can you use it to improve the
following code?
<?php
function perform_database_action(){
mysql_query(“INSERT into table_name (col1, col2, col3) VALUES ('$value1','$value2',
'$value3');
}

Ans:

3
3. Consider the following code snippet and explain the purpose of wp_enqueue_script.
Can you figure out if something is wrong in the snippet?
add_custom_script();
function add_custom_script(){
wp_enqueue_script(
'jquery-custom-script',
plugin_dir_url( __FILE__ ).'js/jquery-custom-script.js'
);
}

Ans:

4. The following line is in a function inside a theme’s “function.php” file. What is wrong
with this line of code?
wp_enqueue_script('custom-script', '/js/functions.js');

Ans:

5. Consider the following code snippet and write it in OOP method.


function sample_admin_notice__success() { ?>

4
<div class="notice notice-success is-dismissible">
<p><?php _e( 'Done!', 'sample-text-domain' ); ?></p>
</div>
<?php }
add_action( 'admin_notices', 'sample_admin_notice__success' );

Ans:

6. What is the file name, which located in the root of your WordPress installation directory
and contains your website’s setup details, such as database connection info?

Ans:

7. How can you enable the Network Setup menu item(enable Multisite) in WordPress?

Ans:

You might also like