WordPress Interview Questions & Answers – Part2

11. How you will pass a variable by value in WordPress.
Its same like we will work in c,
$a = &$b

12.  What is the procedure to call a constructor for a parent class?
The command to call a constructor for a parent class is

13. Can you answer that whether objects are passed by value or by reference?
All the objects are passed by Value.

14. What is the limitation to the depth of your categories?
There is no limitation level to the depth.

15.  Can you override database values for your sit URLs in wp-config.php?
Yes, overriding of database values is possible.

16. What are the types of hooks in WordPress and mention their functions?
There are two types of hooks
1) Action hooks
2) Filter hooks

Action Hooks :-  Action hooks are points in wordpress core where its possible for outside resources to insert additional code.
For example- wp_head() , the_post(), get_sidebar() is an action hook which is used by most of themes. To hook an action, create an hook in your function file and hook it using add_action() function.

add_action( 'wp_head', 'head_func' );
function head_func () {
echo "<div>This is test</div>";

Filter Hooks :- Filter hooks are used to handle output like using it you will add an text or content at end of content of your post. You will add an filter using add_filter() function. There are various filter used in wordpress as the_title(), wp_title(), get_the_excerpt(), get_to_ping(), attachment_icon().
For example:– Using these filter we will add content add end of posts.

<?php add_filter( 'the_content', 'webs_expert' );
function head_func( $content ) {
if ( is_single() ) {
$content .= '<div>This is test</div>' . " ";
return $content;

17.  What do you mean by custom field in wordpress?
Custom field is a meta-data that allows you to store arbitrary information to the wordpress post. Through custom field extra information can be added to the post.

18.  What are the positive aspects of wordpress?
Few positive aspects of wordpress are

  • Easy installation and upgrade
  • In-built SEO engine
  • Easy theme system
  • Flexibility
  • Multilingual- available in more than 70 languages
  • Own data- no unwanted advert on your website
  • Flexibility and Easy publishing option

19. Is WordPress good for Google ranking and SEO?
Yes! WordPress was born with one of key features to drive the traffic called built-in SEO and it is the most considered point along with other features in this technology, which makes it popular worldwide. Search engine optimization is considered the best selling point of WordPress to boost the traffic over the web or in other words Google ranking. Although there are multiple CMSs, but they require an installed SEO extension, whether commercial or free, but WordPress is SEO-ready. It can further extend the SEO feature via a few Nice FREE SEO plugins, including All in one SEO and Yoast. These well-known & popular plug-ins help you rank your website’s on multiple search engines like Google, Bing and Yahoo.

20.  Can you give 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.

Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.
Subscribe Here (or)

Leave a Reply

Your email address will not be published. Required fields are marked *

nine − 2 =

Popup Dialog Box Powered By : XYZScripts.com
  • RSS
  • Facebook
  • Google+
  • Twitter