Home >> Interviews Q & A >> Wordpress developer interview questions

Wordpress developer interview questions

Wordpress developer interview questions: Wordpress questions ask with a Wordpress developer. WordPress is a free, open-source CMS written in PHP.
WordPress is an open source CMS written in PHP.
Q:- What is the different between wordpress.com vs wordpress.org?
wordpress.com
WordPress.com (fully hosted), Focus on your beautiful content, and let us handle the rest.
wordpress.org
WordPress.org (self-hosted), Get your hands dirty, and host your website yourself.
Q:- Use of WordPress?
  1. WordPress is a free and open-source blogging tool and a content management system (CMS) based on PHP and MySQL. Features include a plugin architecture and a template system.
  2. WordPress was used by more than 23.3% of the top 10 million websites as of January 2015.As of February 2016, WordPress is used by 59.1% of all the websites whose content management system we know. This is 25.8% of all websites.
Q:- Feature of WordPress?
Here are some of the features that we think that you’ll love.
  1. Simplicity
  2. Flexibility
  3. Publish with Ease
  4. Publishing Tools
  5. User Management
  6. Media Management
  7. Full Standards Compliance
  8. Easy Theme System
  9. Extend with Plugins
  10. Built-in Comments
  11. Search Engine Optimized
  12. Multilingual
  13. Easy Installation and Upgrades
  14. Importers
  15. Own Your Data
  16. Freedom
  17. Community
  18. Contribute
Q:- Developer Features in a WordPress?
For developers, WordPress Have lots of goodies packed under the hood that you can use to extend WordPress in whatever direction takes your fancy.
  1. Plugin System
  2. Theme System
  3. Application Framework
  4. Custom Content Types
  5. The Latest Libraries
Q:- Why You Should Use WordPress?
WordPress is that it’s easy to use and flexible enough for just about anything. That’s the main reason why WordPress has grown so much in popularity. According to a recent survey, WordPress powers 22.5% of all websites on the internet. Let’s take a look at why you should use WordPress.
  1. WordPress is Free as in Freedom
  2. Easy to Use and Learn
  3. Extendable by Using Themes and Plugins
  4. Search Engine Friendly
  5. Easy To Manage
  6. Safe and Secure
  7. WordPress Can Handle Different Media Types
Q:- What ways to use WordPress?
WordPress can be used in many different ways. It is open to possibilities. You can use WordPress as the following:
  1. Arcade
  2. Blog
  3. Content Management System (CMS)
  4. Gallery
  5. Portfolio
  6. Rating Website
  7. Shopping Store
  8. Video Collection Site
  9. Membership Site
Q:- What is plugin in WordPress?
Plugins are ways to extend and add to the functionality that already exists in WordPress. The core of WordPress is designed to be lean and lightweight, to maximize flexibility and minimize code bloat. Plugins then offer custom functions and features so that each user can tailor their site to their specific needs.
Q:- What are the rules that you have to follow for WordPress plugin development?
  1. Create a unique name
  2. Create the plugin’s folder
  3. Create a sub-folder for PHP files, translations and assets
  4. Create the main plug-in file and fill in header information
  5. Create activation and de-activation functions
  6. Create an uninstall script
  7. Create a readme.txt file
  8. To detect paths to plugin file use proper constants and functions
Q:- How to run database Query in WordPress?
$wpdb->query("select * from $wpdb->posts where ID > 10");
Q:- What is the difference between the wp_title and the_title tags?

wp_title() function is for use outside "The Loop" to display the title of a Page.

the_title() on the other hand is used within "The Loop".

Q:- How to Secure WordPress?
Security in WordPress is taken very seriously, but as with any other system there are potential security issues that may arise if some basic security precautions aren’t taken.
Q:- Template Files List for development WordPress Theme?
Here is the list of the Theme files recognized by WordPress. Of course, your Theme can contain any other stylesheets, images, or files.
style.css:
The main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.
rtl.css:
The RTL stylesheet. This will be included automatically if the website’s text direction is right-to-left. This can be generated using the RTLer plugin.
index.php:
The main template. If your Theme provides its own templates, index.php must be present.
comments.php:
The comments template.
front-page.php:
The front page template.
home.php:
The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.
single.php:
The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.
single-{post-type}.php
The single post template used when a single post from a custom post type is queried. For example, single-book.php would be used for displaying single posts from the custom post type named “book”. index.php is used if the query template for the custom post type is not present.
page.php:
The page template. Used when an individual Page is queried.
category.php:
The category template. Used when a category is queried.
tag.php:
The tag template. Used when a tag is queried.
taxonomy.php:
The term template. Used when a term in a custom taxonomy is queried.
author.php:
The author template. Used when an author is queried.
date.php:
The date/time template. Used when a date or time is queried. Year, month, day, hour, minute, second.
archive.php:
The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types.
search.php:
The search results template. Used when a search is performed.
attachment.php:
Attachment template. Used when viewing a single attachment.
image.php:
Image attachment template. Used when viewing a single image attachment. If not present, attachment.php will be used.
404.php:
The 404 Not Found template. Used when WordPress cannot find a post or page that matches the query.
Q:-prefix of WordPress tables by default?
By default, wp_ is the prefix
Q:- Plugin for Multi-language features?
WPML Multilingual Plugin.
URL: https://wpml.org/
Q:- Alternative CMS of WordPress?
  1. Drupal
  2. Joomla
  3. SilverStripe
Q:- How to turn off the Notice/Warning from my wordpress website?
Open the wp-config.php file and WP_DEBUG set the false.
define('WP_DEBUG', false );
Q:- What is use of __() and _e() functions in Wordpress?
These are the function used when you website multilingual. each of this function has two parameters.

1st parameter: String which you want to convert from one language to another.

2nd parameter: domain name.

Q:- How to check admin login or Not?
if(is_admin()) {
// write your logic here
}
Q:- How to get the current page name in WordPress?
You can get the page name from below of two?
$slug = basename(get_permalink());
OR
$pagename = get_query_var('pagename');
Q:- What is Hooks in wordpress?
Hooks allow user to create WordPress theme or plugin with shortcode without changing the original files.
Q:- What are the types of hooks in WordPress?
Following are two types of hooks A) Action hooks: This hooks allow you to insert an additional code. B) Filter hooks: Filter hooks will only allow you to add a content or text at the end of the post.
Q:- What types of hooks in wordpress is used?
1) Actions hooks:.
  1. has_action()
  2. add_action()
  3. do_action()
  4. do_action_ref_array()
  5. did_action()
  6. remove_action()
  7. remove_all_actions()
2) Filters hooks .
  1. has_filter()
  2. add_filter()
  3. apply_filters()
  4. apply_filters_ref_array()
  5. current_filter()
  6. remove_filter()
  7. remove_all_filters()
Q:- What is the default prefix of wordpress tables?
wp_ is the prefix for wordpress but you can change at the time of installation.
Q:- How can you backup your WordPress content?
WordPress admin -> Tools -> Import
Q:- List most commonly functions used in wordpress?
  1. wp_nav_menu() :- Displays a navigation menu.
  2. is_page() :- to check if this is page OR NOT, will return boolean value.
  3. get_the_excerpt() :- Copy the excerpt of the post into a specified variable.
  4. in_category() :- Check if the specified post is assigned to any of the specified categories OR not.
  5. the_title():- Displays the title of the post in website.
  6. the_content():- Displays the contents of the post in website.
Q:- What are the file structure in wordpress?
Following are main files which used in wordpress
  1. index.php :- for index page.
  2. search.php :- For display the search result page.
  3. single.php :- for single post page.
  4. page.php :- display the static pages.
  5. category.php :- Display the category page.
  6. tag.php :- For display the tags page.
  7. author.php :- For display author page.
  8. taxonomy.php :- For display the taxonomy archive.
  9. attachment.php :- For managing the single attachments page.
  10. header.php :- For managing top part of page.
  11. footer.php :- For manage bottom part of pages.
  12. archive.php :- For archive page display.
  13. 404.php :- For display 404 error page.
Q:- What is name of function which is used to register a shortcode handler?
add_shortcode
It has two parameter. first is shortcode name and second callback function. #Example:
add_shortcode( 'shortcode', 'shortcode_handler' );
Q:- How to create shortcode in wordpress? Give working example?
You can use following syntax:
add_shortcode( $tag , $func );

function baztag_func( $atts, $content = "" ) {
 return "content = $content";
}
add_shortcode( 'baztag', 'baztag_func' );

Use: [baztag]content[/baztag]
Ref Link: https://codex.wordpress.org/Function_Reference/add_shortcode
Full Stack Tutorials

Author | Blogger @FullStackTutorials | View all articles