WordPress



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

  • Install security plugin like WP security
  • Re-install the latest version of WordPress
  • Change password and user-ids for all your users
  • Check your themes and plugins are up to date


22. Why widget does not show up in the sidebar?  

While using widget you have to ensure whether your theme supports the widget and if it does then it must show the sidebar. If in any case if it happens that you don't see the sidebar then it might be missing the "function.php" file or file similar to that. This can also happen if you have forgot to save the changes in the widget or refreshing the older display of the page.



23. What is the difference between starting a string with single quote and double quote? What you will use in general instance?  

A data kept inside a single quoted string is not parsed for variable substitution where as when we initialize the string with double quote the data is parsed for variable substitution. If we don't require variable substitution particularly then it is always preferred to use single quote as it is much speedy process.



24. In which cases you don't see plugin menu?  

You can't see your plugin menu when the blog is hosted on free wordpress.com as you cannot add plugin there. Also, if you do not have an account of an administrator level on your WordPress dashboard, it is not possible to see plugin.




25. Why wordpress.com is considered more secure than wordpress.org?  

WordPress.com is considered more secure than wordpress.org because they limit the themes and also does not allow installing plugin's. However the security is more dependable on how the hosting company is hosting your website(wordpress.org) & also what are the steps they are taking to prevent the security problems.



26. What is At a glance in Wordpress Dashboard?  

This section gives overview of your blog's posts, number of published posts and pages, number of comments. When you click on these links, you will be taken to the respective screen. It displays the current version of running Wordpress along with currently running theme on the site.



27. Essential plugins for WordPress?  

Here i am going to share some useful plugins that really help you so much for managing and improving performance as well security of WordPress.

https://wordpress.org/plugins/wordpress-seo/ (Best SEO Plugin)
https://wordpress.org/plugins/google-sitemap-generator/ (sitemap)
https://wordpress.org/plugins/w3-total-cache/ (caching)
https://wordpress.org/plugins/wp-smushit/ (optimizing image files)
https://wordpress.org/plugins/wp-optimize/ (Simple but effective plugin allows you to extensively clean up your WordPress database and optimize it without doing manual queries: )

Security:
https://wordpress.org/plugins/wordfence/
https://wordpress.org/plugins/login-lockdown/



28. How to modify the parent theme behavior within the child theme?  

The child theme could optionally override other template files like author.php, category.php, functions.php, style.css etc. The WordPress framework first looks for a template file in the child theme directory and then will pick it up from the parent directory if not found.

For more details: http://code.tutsplus.com/articles/how-to-modify-the-parent-theme-behavior-within-the-child-theme-wp-31006



29. In what case we cannot recommend WordPress to our client?  

We cannot recommend WordPress on following situation:
  • If client is working on non-CMS base project
  • If site wants complex or innovative e-commerce
  • In case of enterprise intranet solution
  • Sites requiring custom scripting solutions.


30. What is Activity Widget in Wordpress Dashboard?  

The Activity widget includes latest comments on your blog, recent posts and recently published posts. It allows you to unapprove or approve the comment, reply to the comment, editing the comment or you can delete the comment or move it to spam.



31. 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.

You need to read "http://codex.wordpress.org/Hardening_WordPress" carefully to understand WordPress security.



32. How to Create Custom Post Type?  

Custom post types are new post types you can create. A custom post type can be added to WordPress via the register_post_type() function. This function allows you to define a new post type by its labels, supported features, availability and other specifics.

Here's a basic example of adding a custom post type:

    add_action( 'init', 'create_post_type');
    function create_post_type() {
      register_post_type( 'acme_product',
        array(
          'labels' => array(
            'name' => __( 'products' ),
            'singular_name' => __( 'product')
          ),
          'public' => true,
          'has_archive' => true,
       )
     );
   )
   


33. How you can create a static page with WordPress?  

To create a static page in wordpress, in the page section you have to upload a php files to the server in the theme folder, and then select that as your template. This allows you to add any page and look that you wanted for your blog and it will remain static.



34. What is Wordpress Writing Setting?  

The writing settings controls Wordpress writing experience and provides options for customizing Wordpress site. These settings control WordPress's features in the adding and editing posts, Pages, and Post Types, as well as the optional functions like Remote Publishing, Post via e-mail, and Update Services.



35. 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.



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

Because post queries are usually sorted in reverse chronological order, next_posts_link() usually points to older entries (toward the end of the set) and previous_posts_link() usually points to newer entries (toward the beginning of the set).



37. Do you need to have a blog in order to use WordPress for site?  

WordPress was originally used as blogging software though it has since become popular for website also. It is not necessary to have a blog to use wordpress. Still having blog is commendable as it will help in search engine optimization.



38. What is a Moderate comment?  

Comment moderation is a process where, when visitors comment on posts, the comment is not published directly until and unless it is approved by the admin to be posted. It manages your comments so that there is no comment spamming.



39. Alternative CMS of WordPress?  

Joomla
Drupal
Ghost
Movable Type
Silver Stripe



40. What options are there to implement a multi language site ?  

WordPress has no bi/multi-language feature built in by default. The other road would be to extend the site with Add-ons like plugins and themes that have multi-language features built-in.



.Net Interview Question

PHP Interview Question

Java Interview Question

AngularJS Interview Questions