1. Tell me can WordPress use cookies?
Yes, wordpress use cookies. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users.
2. Tell me the ternary conditional operator in PHP language?
Ternary Condition is a very popular operator in PHP which evaluates the expression preceding the ?. If the condition is true then it executes the expression preceding : and If the condition is false then it executes the expression following :.
3. Tell me in what case 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 is not possible to see plugin.
4. Tell me how do I find the absolute path I need for uploading images?
To find the absolute path of a page, absolutepath.zip will help you. Download, unzip, ftp to the location of the page / image / directory and then call the file in your browser
5. Explain me a difference between characters 35 and x35?
These Both Characters are a way different from each other. The first character is defined as octal 35 whereas the second one is Hex 35.
6. Explain what is the special meaning of _sleep and _wakeup?
_sleeps return the array of all variables than need to be saved, while _wakeup retrives them.
7. Tell us can you override database values for your sit URLs in wp-config.php?
Yes, overriding of database values is possible.
8. Tell me what are the plugins you can use to create contact form in WordPress?
To create a contact form in WordPress you can use plugin like Gravity forms or also you can use a free plugin contact form 7.
9. Do you know blog is a necessary part to be included in a WordPress Website?
No it is not a necessary part. Although WP was first designed as a platform for blogging but now it can be used for every genre of websites. Blogs are added in the website to provide valuable information to the visitor and for a better SEO.
10. Explain me what are the custom fields in wordpress? How to display it?
We will add extra information to our post by using custom fields.Custom Fields are a form of meta-data that allows us to store arbitrary information with each WordPress post.
To display the Custom Fields for each post, use the the_meta() template tag.
To fetch meta values use the get_post_meta() function.
For example we use custom fields:-
<?php echo get_post_meta($post->ID, ‘key’, true); ?>
11. Tell me is there any other CMS better WordPress?
WordPress is no doubt a good CMS, but Drupal and Joomla are among the best CMS you can work with.
12. Tell me what is the limitation to the depth of your categories?
There is no limitation level to the depth.
13. What is the method to define a constant?
We can define a constant by using the below provided command
define() directive
The example of defining a Constant is (“WEBGRANTH”, 100);
14. Explain which is the best multi-lingual plugin for wordpress?
Keeping all the limitations in mind, WPML would be the best multi-lingual plugin for wordpress .
15. Explain me why can't I delete the uncategorized Category?
Any Category with a non-zero value for # of Posts in the Administration > Manage > Categories cannot be deleted. The uncategorized Category might be assigned to some Posts, but all Pages are assigned the uncategorized Category. So even though there may be no posts assigned to the uncategorized Category, Pages are included in the count of # of Posts.
The default category cannot be deleted even if it is empty, however you can specify your default categories for posts or links on the Options – Writing page of the admin panel.
16. Explain me what is the procedure to call a constructor for a parent class?
The command to call a constructor for a parent class is
parent::constructor($value)
17. Tell me how include and require are different from each other?
Both include and require scans the program. If the require() function doesn't find any file than the script will not execute. On the other hand if the include() file can't find a file or encounter any error then the warning notification will be raised but the script will still execute.
18. Tell me how is creating a site on wordpress.org different from wordpress.com?
Most of the things are similar in both except the choices of themes and the usage of plugins.
19. Explain me what is the ternary conditional operator in PHP?
Expression preceding the ? is evaluated, if it's true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
20. Do you know what is the default prefix of wordpress tables?
By default prefix of wordpress is wp_ . But for security reasons it is highly recommend to use different prefix.
21. Tell me will comparison of string 10″ and integer 11 work in PHP?
Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
22. Tell us can I rename the WordPress folder?
If you have not already installed WordPress, you can rename the folder with the WordPress files, before, or even after uploading the files.
If you have already installed WordPress, and you want to rename the folder, login to the weblog as the administrator and change the following settings in Settings > General:
WordPress address (URI):
Blog address (URI):
Once you have done this, you can rename the directory or folder with the WordPress files in it.
23. Tell me can you update your own content on the site?
It depends on the type of the site or project, but yes one can update their own content on the site.
24. Please explain 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.
25. Do you know what is the current version of wordpress?
You need to quote the current version of WordPress available in market along with the release date. WordPress team continuously updating core. So see current version on below url https://wordpress.org/
26. Explain me what is the WordPress loop?
The Loop are php code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page.
For example:-
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
//
// Post Content here
//
} // end while
} // end if
?>
27. Explain me when you will use endif function to end the condition statement?
The endif function is used to end the conditional statement when the parent if is followed by : and the code is blocked without the use of any braces.
28. Explain me how do I change the site admin name?
To change your Admin Name, in the Administration Panel, choose the Users->Your Profile tab. Make your changes there. However, you are not able to change the username from within the Administration panel. In order to do this you must directly edit the MySQL database, however this is not recommended as your username is not often seen by other users.
29. Tell us 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.
30. Tell me how do I determine a Post, Page, Category, Tag, Link, Link Category, or User ID?
Sometimes it is necessary to know the ID of a particular Post, Page, Category, Tag, Link, Link Category, or User. To determine that ID, use one of these method:
Look in your browser status bar for the ID:
Visit the related ‘Edit' screen in your Administration Panel. For instance in the case of Posts visit Posts->Edit, for Pages visit Pages->Edit, and for Categories visit Posts->Categories.
Now hover your mouse over the ‘item' you need the ID. In the case of Pages, hover over that particular Page's title in the Title column and for Categories hover over the Categories Name in the Name column.
Look at the status bar (at the bottom of your browser) and the you will find at the end of the line something like “post=123″ or “cat_ID=67″. In these cases, 123 is the Page ID, and 67 is the Category ID.
Install a plugin:
Install and activate Reveal IDs for WP Admin, Simply Show IDs, or ShowID for Post/Page/Category/Tag/Comment.
Find the ID displayed with each item.
31. Explain me that whether the comparison of string “50ᕙ and integer 60 will work in PHP or not?
Yes it will work as the PHP will consider the comparators as Integer type and hence will compare 50 and 60.
32. Tell me what are the template tags in wordpress?
A template tag is code that instructs WordPress to “do” or “get” something. Like in header.php we will use the tag bloginfo(‘name') to get information from user profile.
☛ The the_title() template tag is used to display the post title.
☛ wp_list_cats() are for display categories.
☛ get_header() for getting header.
☛ get_sidebar() for display the sidebar on page.
☛ get_footer() for get the footer content on page.
33. Tell me from SEO point of view is wordpress helpful? Will it show the website on Google?
It is one of the benefit of using wordpress, it has inbuilt SEO search engine. Also, you can have an additional plug-in in wordpress to help with SEO and rank on a popular search engine like Google.
In this case the braces will not affect the outcome as the variable is all by itself.
35. Tell me do you know why doesn't the following code print the newline properly?
<?php
$str = ‘Hello, there.nHow are you?nThanks for visiting Us’;
print $str;
?>
Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters – and n.