Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

601.

What is config file in WordPress?

Answer»

wp-config.php is the most important file in WORDPRESS installation. It LINKS the DATABASE and files on your WordPress site together. LOCATED in the root of WordPress file directory, wp-config.php contains configuration details, including database connection information.

602.

What is custom fields in WordPress?

Answer»

Custom FIELDS are metadata used to INCLUDE additional information about a post or page, like author NAME, title, date and time, etc. By default, the custom fields option in WordPress is hidden on the "edit" screen. If you want to SEE it, click ‘Screen Options’ at the top and enable "custom fields."

603.

What are the steps to install WordPress theme?

Answer»

Here are the steps:

  • In LOGIN DASHBOARD, click "Appearance" "Theme" and "Add New."
  • On the top of your screen, click “UPLOAD.” Click “Browse,” and select.ZIP file for a downloaded EXTENSION.
604.

How do I update my wordpress website?

Answer»

There are TWO ways to UPDATE your WordPress - one-click update and manual update.

1. One-click update

All versions of WordPress from 2.7 onwards have this feature. You can update by going to the Dashboard and clicking "Updates" SCREEN. On "Update WordPress," click "Update Now" for initiating the process.

2. Manual Update
  • Replace your WordPress files
  • Download and unpack the latest zip file.
  • Deactivate PLUGINS and delete old wp-includes and wp-admin directories on your host.
  • Using FTP, upload new wp-includes and wp-admin directories.
  • Upload individual files from a new wp-content folder, and overwrite existing files. Do NOT delete existing wp-content folder or files and folders in the current wp-content DIRECTORY.
  • Next, upload new files from the root directory of the latest version to your current directory.
605.

How we can install plugins in WordPress?

Answer»

The quickest way to install plugins on WordPress is through plugin SEARCH.

Here are the steps:
  • On the admin PAGE of your site, CLICK "Plugins," and "Add New."
  • Search for plugins by typing the name or functionality.
  • You may see a couple of listings
  • Just SELECT the plugin that you want and click ‘Install Now.’
  • WordPress will download and install the selected plugin.
606.

What are the difference between Tag & Category in WordPress?

Answer»

 

In WORDPRESS categories are hierarchical which means terms can have a relationship with each other like CHILD and parent.
Example: You could have a Category CALLED INDIA, and under India, you could have categories called Delhi, Haryana, and U.P. Categories means for broad grouping of posts.

But Tags are NOT hierarchical which means no relationship between them. Tags means to describe SPECIFIC details posts.

607.

How to change the default length of the excerpt in WordPress?

Answer»

To CHANGE the default length of the excerpt in WordPress, we have to insert the below-mentioned syntax to the functions.php FILE and EDIT the amount of the WORDS that we desire to be DISPLAYED in our excerpts.

add_filter( 'excerpt_length', function($length) {
    return X;
} );

Here above X is the number of words to be displayed.

608.

What is Tag in WordPress? Explain

Answer»

A tag is ONE of the pre-defined taxonomy in WordPress. You can add TAGS to POSTS along with categories in WordPress. Tags are smaller in SCOPE and FOCUSED on specific topics.

609.

What is Category in WordPress?

Answer»

A category is one of the predefined taxonomies in WordPress, and it is used to sort and group content into different sections. In new WordPress installation, "Uncategorized" is the default category. We can change the default category from Settings -> Writing SCREEN. In WordPress POST can be filed under many categories and can have both TAGS and categories.

For EXAMPLE

 

610.

What should basic steps when our WordPress site hacked?

Answer»

WordPress platform is one of the most USED CMS platforms on the web. Hence the security of this CSM plays an imperative role. For the protection of WordPress data, it is important to implement STANDARD security policies in WordPress by analyzing the EXISTING loopholes. Following are the steps that should need to perform when your WordPress platform will be hacked-

  • Stay calm and search for an optimal solution
  • Try to locate the hack
  • Contact your HOSTING company
  • Hire an IT PROFESSIONAL who is having the expertise of InfoSec
  • Restore various WordPress versions
  • Identify, scan and remove the malware
  • Check your access permissions
  • Change security principles (password and secret keys)
Related Article: Drupal Interview Questions
611.

Explain Avatar in WordPress?

Answer»

Avatar or GRAVATAR is an icon or representation of a USER in a shared VIRTUAL reality, such as CHAT, forum, website or any other form of online community in which the user wants to have something to DISTINGUISH themselves from other users.

It usually an 80px by 80px image that the user will create by ownself.

612.

Explain the usermeta function in WordPress.

Answer»

This function is used by developers to RETRIEVE the metadata of users. The usermeta function is capable to return an array or single metadata. The FOLLOWING syntax NEEDS to be used to apply usermeta function.

get_user_meta( int $user_id, string $KEY = '', bool $single = FALSE )

613.

How can you disable comments in WordPress?

Answer»
  • Goto ADMIN panel -> setting -> click on the Discussion tab
  • Under DEFAULT article settings uncheck the BOX NEXT to ALLOW people to post comments on new articles
  • Now click on Save Setting
614.

What are the difference between post and page in WordPress?

Answer»

In WordPress, Posts is a dynamic entity that has a PUBLISHED or updated DATE and is DISPLAYED on the blog page.

Example: news, events etc

Pages do not have published or updated date. Hence there are USEFUL for the STATIC and timeless type of content.

Example, the “About Us” or “Contact Us”

The difference between pages and posts is that the WordPress page is a static entity and post is a dynamic entity.

615.

What is the defaul table prefix in WordPress?

Answer»

wp_

616.

What are the difference between action hook and filter in WordPress?

Answer»

1. Actions Hook

Actions Hook are TRIGGERED by particular events that take place in WordPress such as changing THEMES, publishing a post, or displaying an administration screen. It is a CUSTOM PHP function defined in your plugin and hooked, i.e., set to respond, to some of these events.

Actions offently do one or more of the following things

  • Modify database DATA
  • Send an email message
  • Modify the generated administration screen or front end page sent to a user web browser.

Here are some Actions Functions listed

  • has_action()
  • do_action()
  • add_action()
  • remove_action() etc
2. Filters Hook

Filters Hook are functions that WordPress passes data through, at certain points in execution, just before taking some ACTION with the data. It sits between the database and the browser and between the browser and the database; all most all input and output in WordPress pass through at least one filter hook.

The necessary steps to add your filters to WordPress are listed:

  • Create the PHP function that filters the data
  • Hook to the screen in WordPress, by calling add_filter()
  • Put your PHP function in a plugin file and activate it.

Here are some Filters Functions listed

  • has_filter()
  • doing_filter()
  • add_filter()
  • remove_filter() etc
617.

What are WordPress hooks?

Answer»

It is provided by WORDPRESS to allow your plugin to ' hook into' the WHOLE WordPress; that is, to call functions in the plugin at particular times according to your need and thereby set your plugin in motion.

There are two KINDS of HOOKS:
  • Actions hook
  • Filters hook
618.

How to make any others pages to front page in WordPress?

Answer»

To MAKE your static page as a FRONT page you have to follow these steps

  • Goto Admin Panel
  • Select "A Static Page"
  • Choose you page from "Front page" section
  • Now your SELECTED page from Front Page is set default front page.

 

 

619.

How do you create a page template?

Answer»

We can CREATE templates for various purpose like if we want to make a DIFFERENT layout rather than a home page or if we want to display custom posts types like news than we can create a TEMPLATE and merely display all news there.

Steps to create template in wordpress themes.
  • Create a news.php file on ROOT in theme folder.
  • Insert get_header(); and get_footer(); in news.php page
  • Add in top of this created page. Now this template NAME is "News Template".
620.

What is a permalink in WordPress?

Answer»

Permalinks are the PERMANENT FULL URLs to your website blog posts and pages, as well as your tag ARCHIVES and category. It is the web address used to link to your content. WordPress allows us to create a custom URL structure for your permalinks and archives. It can IMPROVE the usability and forward-compatibility of your website's links.

This SECTION can be located in

Settings → Permalinks
621.

What is plugin? list some important WordPress plugin?

Answer»

WordPress PLUGINS are a type of apps that allows you to add more functionality and features to your WordPress website just like the same way as apps do for your smartphone. Plugins ALLOW you to create any type of the site with WordPress, not just blogs. Nowadays plugins are very popular.

There are LOTS of plugins are available that listed below:-
  • Yoast SEO Plugin (This plugins are used for SEO purpose.)
  • Contact Form 7 (This plugins is used to make web forms with any code)
  • Sitemap & URLS Plugins
  • All In One WP Security & Firewall etc
Advantages of WordPress Plugins
  • Helps in SEO
  • Ease Of Use and Quick Installation Process
  • It helps in to KEEP Secure
  • Strong Community Support
  • Helps to use advanced features of WordPress
622.

How to take backup of our WordPress website?

Answer»

There are three ways to back up a WordPress website thoroughly.

1. Backup Through Hosting

Hosting providers offer service that completes daily, COMPLETE backups to your WordPress website.

2. Backup Files Manually

We have to download the entire WordPress directory via cPanel or SFTP PROGRAM. We can also USE WordPress database to backup website DATA manually.

3. Automated Backup with Plugins

There are many secure and easy to use WordPress backup plugins AVAILABLE for your use. Just install, configure few settings and you are ready to go. Few of them are: BackupBuddy Premium, BackWPup Free WordPress Plugin, Duplicator Free WordPress Plugin, UpdraftPlus Backup and Restoration Free WordPress Plugin, WordPress Backup to Dropbox Free WordPress Plugin, etc.

623.

Explain the template tags in WordPress.

Answer»

The TEMPLATE tags are basically PHP FUNCTIONS used to DISPLAY dynamic information or customized BLOG template. Here is a LIST of some of the generally used template tags in WordPress.

Different template tags in WordPress
  • wp_register()
  • get_header()
  • wp_title()
  • get_sidebar()
  • get_the_author()
  • wp_enqueue_script()
  • category_description()
  • wp_list_authors()
  • get_bookmarks()
624.

How to enable debug mode in WordPress?

Answer»

To enable debug mode in WORDPRESS, DEVELOPERS have to edit the wp-config.php FILE and change the WP_DEBUG CONSTANT value to true condition.

625.

In WordPress, what do you mean by a child theme?

Answer»

The extension of any PARENT THEME present in WordPress is DEFINED as a child theme. Any update to undo the changes in the child theme, if we make changes to the parent theme. While developers WORK on a child theme, the customizations and changes will be PRESERVED on an update.

626.

How to Create a Widget in WordPress?

Answer»

Widget is defined as a configurable CODE SNIPPET which makes it possible to customize the functionality and appearance of a WordPress blog. Users can access the widgets page FORM the appearance menu effectively. Widgets in WordPress allow you to drag and drop the elements into the sidebar of your website. WordPress is featured with a standard set of widgets that you can use with any theme of WordPress. In order to create a customer widget in WordPress, it is important for the customers.

  • In order to create a site-specific plugin, paste the code functions .php file (theme’s file)
  • ADD your code to appearance >> widgets pages
  • register with ‘wpb_widget’ and load customer widgets
627.

How to add custom dynamic sidebars in WordPress?

Answer»

A Sidebar in WordPress is an area where widgets can be used with a theme and this area is also termed as a Widgetized area. In WordPress, sidebar is created by using a FUNCTION named as register_sidebar() function. The widget zed area should be registered in WordPress supported the theme as they are presentational. The sidebar function takes only one argument of an associative array of parameters that SET the options for the widget area. Wrap $args array and register_sidebar() both are separate functions that can be called on ‘widgets_init’ HOOKS. In short, with the use of register_sidebar() method/ function users can add sidebars to WordPress. Syntax code for the creation of sidebar-

$args = array(
   'name' => __( 'Sidebar name', 'theme_text_domain' ),
   'id' => 'unique-sidebar-id',
   'description' => '',
   'class' => '', 'before_widget' => '<li id="%1$s" class="widget %2$s">',
   'after_widget' => '</li>',
   'before_title' => '<H2 class="widgettitle">',
   'after_title' => '</h2>'

);

628.

What is wp_footer() in WordPress?

Answer»

It is a type of ACTION hook where the code is dynamically added to a theme in between FOOTER tag. With the HELP of these functions, we can insert plugins ADDITIONAL code into footer tag.Example <footer>       <?php wp_footer(); ?> </footer>

629.

What is shortcode in WordPress? How we can use it?

Answer»

Shortcodes in WORDPRESS are specific codes that ALLOW the developers to do various tasks with minimal EFFORT. Shortcodes are used to simplify tasks such as creating objects or embedding files that require lots of coding in a single LINE. A Shortcode is synonymous to the shortcut. WordPress has five built-in shortcodes- audio, embed, caption, video, and gallery.

Example

1. You can call shortcode function like this :
echo do_shortcode('[display_related_posts]');

2. In your function.php you can make
function display_related_posts($array = array()) {
      return 'BestInterviewQuestion.com';
}
add_shortcode('display_related_posts', 'display_related_posts');

630.

How to create custom Post In WordPress?

Answer»

Custom posts types in WORDPRESS are the NEW post types that developers can create. You can add a custom post type VIA the register_post_type() function, which allows the developers to define the new post type by LABELS, features, and availability.

Or we can also create custom post type with the helps of plugins.

  • Custom Post Type UI
  • Custom Field
631.

What are the importers in WordPress?

Answer»

In Wordpress, an IMPORTER is a tool, which is used to migrate content from an existing WP website to another ONE. This tool can also be used to move a website from the localhost, i.e. local SERVER to an online hosted server.

Using WordPress importer, you can migrate different data like:

  • New Posts, pages, or other custom CREATED post types
  • Comments in posts
  • Custom fields and post metadata
  • Categories, tags, and other TERMS from custom taxonomies section
  • Authors on the website
632.

How to display custom Post in WordPress?

Answer»

$args = ARRAY( 'post_type' =&GT; 'blog', 'posts_per_page' => 10 );
$LOOP = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
   the_title();
   echo '<div CLASS="entry-content">';
     the_content();
   echo '</div>';
endwhile;

633.

How we can change table prefix ( wp_ ) in WordPress?

Answer»

We can do it 2 ways

  • Before INSTALLATION : Go to wp_config.php file and rename $table_prefix = 'wp_'; whatever you want.
  • After installation : Go to PHPMYADMIN -> select your DATABSE -> check all tables -> Add/Update table prefix.
634.

How to change the homepage URL in WordPress?

Answer»

Here are the steps to successfully change the Homepage URL in Wordpress. GO to the function.php FILE in your WP THEME and use this code:

function redirect_homepage() {
   if( ! is_home() &AMP;& ! is_front_page() )
   RETURN;
   wp_redirect( 'http://siteurl.com/news', 301 );
   exit;
}
add_action( 'template_redirect', 'redirect_homepage' );

635.

How to secure in our WordPress site?

Answer»

Here are some PRACTICAL ways:

  • Use a unique username and password
  • Use precautions against BRUTE force
  • Keep the VERSIONS, plugins, and themes updated.
  • Prevent from VIRUSES and malware.
  • Also you can use WORDPRESS security plugins
636.

How to get a website URL in WordPress?

Answer»

get_site_url( int $blog_id = null, STRING $path = '', string $scheme = null )

All parameters are optional.

This command is used to RETRIEVE URLs for a GIVEN website with WP APPLICATION files accessible.

echo get_site_url();

637.

How many types of users Role in WordPress? Explain

Answer»

We can MAKE MANY TYPES of USER types of ROLE.

  • Administrator Role
  • Author Role
  • Editor Role
  • Subscriber Role
  • Contributor Role
638.

How many default tables are in WordPress?

Answer»

There are altogether 12 TABLES by default in WordPress.

  • wp_options
  • wp_users
  • wp_links
  • wp_commentmeta
  • wp_term_relationships
  • wp_postmeta
  • wp_posts
  • wp_termmeta
  • wp_term_taxonomy
  • wp_usermeta
  • wp_terms
  • wp_comments
Also READ: Laravel INTERVIEW Questions
639.

How to display menu in WordPress?

Answer»

After registering your menus, USE wp_nav_menu() to inform your theme where to display your menus. You can ADD this code to a header.php file for displaying the REGISTERED header-menu:
wp_nav_menu( ARRAY( 'theme_location' => 'header-menu' ) );

Example

wp_nav_menu( array $args = array(
   'menu' => "",
   'menu_class' => "",
   'menu_id' => "",
   'container' => "",
   'container_class' => "",
   'container_id' => "",
   'fallback_cb' => "",
   'before' => "",
   'after' => "",
   'link_before' => "",
   'link_after' => "",
   'echo' => "",
   'depth' => "",
   'walker' => "",
   'theme_location' => "",
   'items_wrap' => "",
   'item_spacing' => "",
) );
// These are the parameters od this function.

640.

Why WordPress is the best CMS?

Answer»

WordPress is the best CMS in the world because of its features and ADVANTAGES. It offers an open source environment which makes it completely free to manage and install.

There are many REASONS why WordPress is considered the best CMS. Some of them are listed below:

  • Available huge Themes and Plugins
  • SEO FRIENDLINESS and Security
  • Open source and Free of Cost
  • A large community of DEVELOPERS and users
  • Inbuilt ADMIN User Interface and its Speed
641.

Why WordPress is so popular?

Answer»

WordPress is so POPULAR because of its features. It is the most popular content management system (CMS) in the world. It is the first choice of everyone who want to create a website because of its popularity. It is of many PHP/MySQL content management systems that allow content EDITORS to use a web interface to maintain their websites instead of editing and uploading HTML files to a server.

WordPress features include a plug-in architecture and template system. Nowadays, WordPress is USED by more than 19% of the top million websites.Why WordPress is so popular?
  • Simplicity and Flexibility
  • In-corporate with PUBLISHING tools
  • User Management
  • Media Management
  • Full Standards Compliance
  • Ease Theme System
  • Extend with Plugins
  • Built-in Comments
  • Search Engine Optimized & Multilingual
  • Open Source
642.

What is the latest version of WordPress?

Answer»

The latest VERSION of WORDPRESS is 5.9.3 and it is RELEASED on April 5, 2022.