1. You can limit the number of revisions WordPress stores by _____Note: Categories must have distinct slugs. Even if two categories have different parents and would therefore have different permalinks, you can’t assign them the same slug.

Answers:

  1. adding the following line to your wp-config.php file: define(‘WP_POST_REVISIONS’, 3);
  2. using a plugin
  3. changing a setting on admin panel

2. Which of the following will hash a string/password to its md5 equivalent?

Answers:

  1. md5()
  2. wp_generate_password()
  3. wp_generate_md5()
  4. password_md5()

3. Which conditional tag checks if the dashboard or the administration panel is attempting to be displayed by returning “true’ (if the URL being accessed is in the admin section) or “false” (for a front-end page).

Answers:

  1. my_admin()
  2. view_admin()
  3. is_admin()
  4. root_admin()

4. Which of the following functions are used to add administration menu item in WordPress ?

Answers:

  1. add_menu_page();
  2. add_admin_item();
  3. add_admin_page();
  4. add_admin_option();

5. Which of the following WordPress Multisite functions allows for getting content from one blog and display it on another?

Answers:

  1. switch_blog()
  2. switch_to_blog()
  3. restore_current_blog()
  4. restore_to_current_blog()

6. What is the BEST way to get last inserted row ID from WordPress database ?

Answers:

  1. Use the following code snippet $lastid->$wpdb=$last->get_row;
  2. The call to mysql_insert_id() inside a transaction should be added: mysql_query(‘BEGIN’); // Whatever code that does the insert here. $id = mysql_insert_id(); mysql_query(‘COMMIT’); // Stuff with $id.
  3. The following code snippet should be added $last = $wpdb->get_row(“SHOW TABLE STATUS LIKE ‘table_name'”); $lastid = $last->Auto_increment;
  4. Straight after the $wpdb->insert() insert, the following code should be added: $lastid = $wpdb->insert_id;

7. Which of the follow is a WordPress alternatives for Ruby on Rails?

Answers:

  1. Refinery
  2. Typof
  3. Symenta
  4. Rubyalt

8. Which of the following code snippets can be used to create custom POST status in wordpress 3.0 +?

Answers:

  1. register_new_post()
  2. register_post_status()
  3. add_new_post_status()
  4. modify_post_status()

9. How can the upload media panel be included in a WordPress template/plugin?

Answers:

  1. By using function wp_enqueue_script(‘media-upload’)
  2. By using function wp_add_media( );
  3. By using function wp_enqueue_script(‘upload’);
  4. By using function wp_add_script(‘media-upload’);

10. What are the database privileges that are required for WordPress?
Answers:

  1. insert, delete, update, drop and alter
  2. select, insert, delete, update, create, drop and alter
  3. insert, delete, update, create, drop and alter
  4. insert and delete

11. Which of the following is an example of a WordPress plugin that provides multilingual capabilities?

Answers:

  1. WP Super Cache
  2. qTranslate
  3. BuddyPress
  4. Hotfix

12. Which of the following functions can be used to create a WordPress page?

Answers:

  1. wp_insert_post()
  2. wp_insert_page()
  3. wp_create_post()
  4. wp_create_page()

13. Which function is used to display the name of current page in wordpress?
Answers:

  1. get_the_title()
  2. content_title()
  3. page_name()
  4. post_name()

14. Which of the following methods can be used to make permalinks SEO friendly?

Answers:

  1. Updating the database.
  2. Changing the source code.
  3. Configuring the feature in the config file.
  4. Configuring the feature in the admin settings.

15. User Level 7 converts to _________?

Answers:

  1. Contributo
  2. Autho
  3. Edito
  4. Subscribe
  5. Administrato

16. Which of the following is the correct way to add custom excerpts length identifiers in WordPress?

Answers:

  1. By adding excerpt_length filter in function.php
  2. Can’t declare custom excerpts in wordpress
  3. Custom exceprts are already available in wordpress
  4. Using the_excerpt(‘long’); or the_excerpt(‘short’)

17. Which of the following is the correct sequence of steps to adapt a WordPress plugin to a multisite?

Answers:

  1. 1. Use $wpdb to iterate through all blogs 2. Hook according to the $blog_id 3. Install the plugin as Network only 4. Uninstall depends the specific plugin
  2. 1. Use $wp_posts to iterate through all blogs 2. Hook according to the $function 3. IInstall the plugin as Network only 4. Uninstall depends the specific plugin
  3. 1. Use $wp_posts to iterate through all blogs 2. Hook according to the $function 3. Install other activations except Network 4. Uninstall is the same for all the plugins
  4. 1. Use $wp_posts to iterate through all blogs 2. Hook according to the $function 3. Install the plugin as Network only 4. Uninstall is same for all the plugins

18. On which of the following databases can WordPress be installed by default?

Answers:

  1. MySQL
  2. Oracle Database
  3. Microsoft SQL Server
  4. PostgreSQL

19. Which of the following actions must be performed to import data from wordpress.com?

Answers:

  1. Enter the full access to wordpress.com into the data import form so that it can automatically connect and directly retrieve content.
  2. Import from wordpress.com’s RSS.
  3. Login to wordpress.com, then the export data using the export tool, then import an exported xml file to the site.

20. Meta tags can be added to WordPress pages by ________________.

Answers:

  1. using plug-ins
  2. adding them to the header.php file
  3. updating the database
  4. a and
  5. and c

21. Which of the following codes will return the current plugin directory in WordPress?

Answers:

  1. <!–?php plugin_basename($file); ?–>
  2. <!–?php plugin_basename(‘url’); ?–>
  3. < !–?php bloginfo_plugin(‘url’); ?–>
  4. < !–?php content_plugin_url( $path ); ?–>

22. WordPress’s requirements are modest. At minimum, which of the following standards should your server support for WordPress 3.1?

Answers:

  1. PHP version 4.4.9 or greater, MySQL version 4.0 or greater
  2. PHP version 4.3 or greater, MySQL version 4.1.2 or greater
  3. PHP version 4.4.9 or greater, MySQL version 5.1 or greater
  4.  PHP version 4.3 or greater, MySQL version 5.1 or greater

23. Which of the following will give the option to add inline Ajax for comment posting?

Answers:

  1. Enabling Ajax in the wp-config.php file
  2. Activating Ajax from the admin settings of WordPress
  3. Using the Ajax Comment Posting plugin
  4. WordPress doesn’t support inline Ajax.

24. What is the limitation to the depth of your categories?

Answers:

  1. 10 levels
  2. 20 levels
  3. No limit levels

25. Can the contents of the wp-content folder be moved or renamed without changing any settings?

Answers:

  1. Yes
  2.  No

26. Which of the following code snippets best protects a system from SQL injections?

Answers:

  1. sql_real_escape_strong()
  2. mysql_real_escape()
  3. mysql_real_escape_string()
  4. mysql_not_real_delete_string()

27. Which of the following role levels has the highest privilege?

Answers:

  1. Level_0
  2. Level_10
  3. Depends on your settings.
  4. Every role level has the same privilege.

28. How can the Home link be disable from the WordPress top nav?

Answers:

  1. Using Jquery to hide it
  2. By adding this code in functions.php function page_menu_args( $args ) { $args[‘show_home’] = FALSE; return $args; } add_filter( ‘wp_page_menu_args’, ‘page_menu_args’ );
  3. wp_nav_menu( array(‘menu’ => ‘news’, ‘show_home’ => false))
  4. Can not disable the default Home link from wordpress top nav

29. Which of the following is the correct way to retrieve a featured image from a post?
Answers:

  1. <!–?php echo get_post_thumb($page->ID, ‘thumbnail’); ?–>
  2. <!–?php echo get_featured_image($page->ID, ‘thumbnail’); ?–>
  3. <!–?php echo get_the_post_thumbnail($page->ID, ‘thumbnail’); ?–>
  4. <!–?php echo get_post_thumbnail($page->ID, ‘thumbnail’); ?–>

30. Which of the following will correctly load localized (translated) text for a WordPress plugin?

Answers:

  1. function custom_theme_setup() { $lang_dir = get_template_directory() . ‘/lang’); load_theme_textdomain(‘tutsplus’, $lang_dir); } add_action(‘after_setup_theme’, ‘custom_theme_setup’);
  2. function custom_theme_setup() { $lang_dir = get_template_directory() . ‘/lang’); add_action(‘after_setup_theme’, ‘custom_theme_setup’); }
  3. function custom_theme_setup() { $lang_dir = get_template_directory() . ‘/lang’); add_action(‘after_setup_theme’, ‘custom_theme_setup’); } load_theme_textdomain(‘tutsplus’, $lang_dir);
  4. function load_theme_textdomain(‘tutsplus’, $lang_dir); { $lang_dir = get_template_directory() . ‘/lang’); custom_theme_setup(); } add_action(‘after_setup_theme’, ‘custom_theme_setup’);

31. Image size limits can be set _______________.

Answers:

  1. directly in the posts
  2. in the wp-imageresize plug-in
  3. in the admin settings
  4. a and

32. How can a user be found through its meta data?

Answers:

  1. User can not be retrieved through its meta data
  2. get_user_by_metadata($metaid,$metavalue)
  3. get_user($args)
  4. get_users($args)

33. Which PHP method(s) can be used to send form data that is persistent across succeeding page views (such as for a language selection feature) in WordPress?

Answers:

  1. POST
  2. GET
  3. SESSION or COOKIE
  4. POST or GET

34. Which of the following will call the WordPress media uploader form element?

Answers:

  1. <form enctype=”multipart/form-data” method=”post” action=”<?=bloginfo(“siteurl”);?>/wp-admin/media-upload.php?inline=&upload-page-form=” class=”media-upload-form type-form validate” id=”file-form”>
  2.  <a onclick=”return false;” title=”Upload image” class=”thickbox” id=”add_image” href=”media-upload.php?type=image&TB_iframe=true&width=640&height=105″>Upload Image</a>
  3. <a href=”media-upload.php?type=image&TB_iframe=true&width=640&height=105″>Upload Image</a>
  4. <form enctype=”multipart/form-data” method=”post” action=”<?=bloginfo(“bloginfo”);?>/wp-admin/media-upload.php?inline=&upload-page-form=” class=”media-upload-form type-form validate” id=”file-form”>

35. Which of the following is the correct way to print the slug property of $firstTag object in this code snippet?$tags = wp_get_post_tags($post->ID);
$firstTag = $tags[0];

Answers:

  1. $firstTag[‘slug’];
  2. $firstTag->slug
  3. $firstTag.slug
    $firstTag[0][‘slug’]

36. Which of the following code snippets is the correct way to get content from Tinymce via javascript ?

Answers:

  1. document.getElementById(‘content’)
  2. tinymce.activeEditor.getContent();
  3. tinymce.element.getContent();
  4. document.getElement(‘tinymce_content’)

37. Is super cache a built-in plugin of WordPress?

Answers:

  1. Yes
  2. No

38. A possible way to allow the display of several authors’ names on one post is to ______

Answers:

  1. update the database
  2. change the admin settings
  3. change the config files
  4. use a plug-in

39. In which way MD5 hash does wordpress stores and represents?

Answers:

  1. In Hex string
  2. In Base64 string
  3. in raw data file
  4. text file

40. What is the first action you need to take for enabling WordPress MU feature?

Answers:

  1. Enable WordPress MU feature on admin panel
  2. Enable Network feature
  3. Add this code to wp-config.php file: define( ‘WP_ALLOW_MULTISITE’, true );

41. What is Automated Testing in WordPress?

Answers:

  1. Automated testing is running test cases where manual intervention is not required to run each one.
  2. It is a plugin which is used to test your custom template or plugin.
  3. It is a function available in WordPress to test the custom template/plugin.
  4.  There is no such thing as Automated Testing in WordPress.

42. Which of the following snippets disable depreciated warnings in WordPress like this one ?

“Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647”

Answers:

  1. define(E_DEPRECATED, false);
  2. error_reporting(E_ALL ^ E_DEPRECATED);
  3. define(E_NOTICE, false);
  4. error_reporting(WP_DEBUG, true)

43. One possible way to collect realtime statistics about traffic on a WordPress site is:

Answers:

  1. using a built-in tool
  2. using a plugin
  3. using a widget
  4. Traffic statistics cannot be collected on a WordPress site.

44. _____________ can publish, edit, and delete their own posts. They cannot write pages. They can upload some kinds of media files, and they are allowed to use only the limited set of HTML tags.

Answers:

  1. Contributo
  2. Autho
  3. Edito
  4. Subscribe
  5. Administrato

45. How can an < li >tag’s class and ID attributes be removed from menu items and page lists?

Answers:

  1. add_filter(‘nav_menu_css_class’, ‘my_css_attributes_filter’, 100, 1); add_filter(‘nav_menu_item_id’, ‘my_css_attributes_filter’, 100, 1); add_filter(‘page_css_class’, ‘my_css_attributes_filter’, 100, 1); function my_css_attributes_filter($var) { return is_array($var) ? array() : ”; }
  2. add_filter(‘nav_menu_css_class’, ‘my_css_attributes_filter’, 100, 1); add_filter(‘nav_menu_item_id’, ‘my_css_attributes_filter’, 100, 1); function my_css_attributes_filter($var) { if(is_array($var)){ $varci= array_intersect($var, array(‘current-menu-item’)); $cmeni = array(‘current-menu-item’); $selava = array(‘selectedmenu’); $selavaend = array(); $selavaend = str_replace($cmeni, $selava, $varci); } else{ $selavaend= ”; } return $selavaend; }
  3. add_filter (‘wp_nav_menu’,’strip_empty_classes’); function strip_empty_classes($menu) { $menu = preg_replace(‘/ class=([“‘])(?!active).*?1/’,”,$menu); return $menu; }
  4. None of the above

46. ____________ can publish, edit, and delete posts and pages written by any user. They can upload some kinds of files, and they can write HTML without restrictions. They can manage links and categories, and they can moderate comments. Editors and administrators are also the only users allowed to read private posts and pages.

Answers:

  1. Contributor
  2. Author
  3. Editor
  4. Subscriber
  5. Administrator

47. Which of the following will show the most recent post (by date) from a custom taxonomy?

Answers:

  1. select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_term_relationships as b on ( a.ID = b.object_id) join wp_term_taxonomy as c on (b.term_taxonomy_id = c.term_taxonomy_id) join wp_terms as d on (c.term_id = d.term_id) where c.taxonomy = ‘post-series’ group by d.name having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
  2. select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_terms as d on (c.term_id = d.term_id) where c.taxonomy = ‘post-series’ group by d.name having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
  3. select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_term_relationships as b on ( a.ID = b.object_id) join wp_term_taxonomy as c on (b.term_taxonomy_id = c.term_taxonomy_id) join wp_terms as d on (c.term_id = d.term_id) having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
  4. select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_term_relationships as b on ( a.ID = b.object_id) join wp_terms as d on (c.term_id = d.term_id) where c.taxonomy = ‘post-series’ group by d.name having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)

48. What are the correct steps in wordpress plugin development:

Answers:

  1. Step 1 – Create your file and let it be known as a plugin Step 2 – Create the objects of your plugin Step 3 – Adding your actions and filters Step 4 – Adding settings/options to your plugin Step 5 – Finishing the code
  2. Step 1 – Adding settings/options to your plugin Step 2 – Create your file and let it be known as a plugin Step 3 – Create the objects of your plugin Step 4 – Adding your actions and filters Step 5 – Finishing the code
  3. Step 1 – Create the objects of your plugin Step 2 – Adding settings/options to your plugin Step 3 – Create your file and let it be known as a plugin Step 4 – Finishing the code
  4. Step 1 – Create the objects of your plugin Step 2 – Adding settings/options to your plugin Step 3 – Finishing the code

49. What is the output of the following code?

<li>example 1

<li>example 2

<li>example 3

<li>example 4

$(document).ready(function(){
$(‘#sortable’).sortable({
update: function(event, ui) {
var newOrder = $(this).sortable(‘toArray’).toString();
$.get(‘saveSortable.php’, {order:newOrder});
}
});
});

Answers:

  1. Removes positions from data base based on the user input
  2. Saves sortable positions to data base based on the user input
  3. Adding new sortable positions from another data base
  4. Sorting out existing positions without updating the data base with the new user inputs

50. Which of the following is the correct way to assign a category to a WordPress post?

Answers:

  1. wp_set_post_categories($postId,$categories)
  2. wp_set_category($catId,$postId)
  3. By XML-RPC call to wpc.newPost
  4. This is not possible

51. Conditional tags can be used to _______________________.

Answers:

  1. get all comments from one post
  2. get all posts from one category
  3. change the content to be displayed
  4. None of the above: conditional tags are not available in WordPress.

52. Which of the following commands can change the ownership of WordPress directory to www-data (for Apache)?

Answers:

  1. sudo chown -Rf www-data *
  2. chown -Rf www-data *
  3. sudo crown -Df www-data *
  4. Alldo chown -Rf www-data *

53. How can a custom content filter be added?

Answers:

  1. By using add_action(‘the_content’,’my_custom_filter’)
  2. By using add_filter(‘the_content’,’my_custom_filter’)
  3. By using wp_filter(‘the_content’,’my_custom_filter’)
  4. By using add_action(‘content’,’my_custom_filter’)

54. How can a post ID be retrieved from the permalink?

Answers:

  1. Its not possible to retrieve the post ID from a permalink due to its structure.
  2. It can be retrieved by using a Regular Expression.
  3. wp_get_post_id($permalink)
  4. url_to_postid($permalink)

55. Which of the following is the correct way to redirect the default login and registration page URL to a custom login and registration page URL?

Answers:

  1. add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { return(‘Your custom url’); exit(); } }
  2. add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { wp_redirect(‘Your custom url’); exit(); } }
  3. add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { redirect(‘Your custom url’); exit(); } }
  4. add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { wp_return(‘Your custom url’); exit(); } }

56. How can a WordPress template be integrated inside a codeigniter framework using WordPress functions like wp_header,wp_footer,wp_sidebar?

Answers:

  1. Include the file wp-blog-header.php from WordPress installation directory to codeigniters index.php and create template inside codeigniter’s view.
  2. Include the file wp-settings.php from WordPress installation directory to codeigniters index.php and create template inside codeigniter’s view.
  3. Create template inside WordPress theme directory and include the file in codeigniter’s view.php file.
  4. It is not possible to integrate wordpress with codeigniter.

57. What is the first action you need to take for enabling the WordPress multisite (MS) feature?

Answers:

  1. Enable the WordPress multisite feature on admin panel
  2. Enable the Network feature
  3. Add this code to wp-config.php file: define( ‘WP_ALLOW_MULTISITE’, true );

58. Which of the functions below is required to create a new taxonomy?

Answers:

  1. add_taxonomy
  2. register_taxonomy
  3. create_taxonomy

59. Which of the following actions cannot be hooked in with add_submenu_page() function?

Answers:

  1. admin_submenu
  2. admin_menu
  3. user_admin_menu
  4. network_admin_menu

60. Which of the following is the correct way to filter the content for a few posts?

Answers:

  1. By using apply_filters(filter,postId)
  2. This is not possible in wordpress
  3. Can create filter for posts in a specific wordpress category
  4. Passing arguments into the_content()

61. What is the function of add_filter in WordPress?

Answers:

  1. It registers a filter for a tag.
  2. It removes line breaks from the pages list.
  3. It is a companion function to apply_filters().
  4. All of the above.

62. Which of the following code snippets will create plugins back-end page without showing it as menu item?

Answers:

  1. add_submenu_page with parent slug = null
  2. add_menu_page with parent slug = null
  3. add_submenu_page without parent slug = null
  4. add_menu_page without parent slug = null

63. ____________ can manage their own profiles, but can do virtually nothing else in the administration area.

Answers:

  1. Contributor
  2. Author
  3. Editor
  4. Subscriber
  5. Administrator

64. Are categories and tags available for pages?

Note: Categories must have distinct slugs. Even if two categories have different parents and would therefore have different permalinks, you can’t assign them the same slug.

Answers:

  1. Yes
  2. No

65. Which of the following is the correct way to get WordPress Post ID from the Post title?

Answers:

  1. $page = get_page_title( ‘About’ ); wp_pages( ‘exclude=’ . $page->ID );
  2. $page = get_page_by_title( ‘Home’ ); $page_id = $page->ID;
  3. $page = get_page_by_title( ‘About’ ); wp_pages( ‘exclude=’ . $page->ID );
  4. None of the above

66. Which of the following will correctly add custom mod rewrite rules to .htaccess from a WordPress plugin?

Answers:

  1. $custom_mod_rewrite = new custom_mod_rewrite; register_activation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); register_deactivation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); add_action(‘generate_rewrite_rules’, array($custom_mod_rewrite, “generate_rewrite_rules”)); class custom_mod_rewrite { function __construct() { $this->wp_rewrite = & $POST[“wp_rewrite”]; }}
  2. $custom_mod_rewrite = new custom_mod_rewrite; register_activation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); register_deactivation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); add_action(‘generate_rewrite_rules’, array($custom_mod_rewrite, “generate_rewrite_rules”)); class custom_mod_rewrite { function __construct() { $this->wp_rewrite = & $GLOBALS[“wp_rewrite”]; } }
  3. $custom_mod_rewrite = new custom_mod_rewrite; register_activation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); register_deactivation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); add_action(‘generate_rewrite_rules’, array($custom_mod_rewrite, “generate_rewrite_rules”)); class custom_mod_rewrite { function __construct() { $this->wp_rewrite = & $GLOBALS[“wp_rewrite”]; } function mod_rewrite_rules($rules) { return preg_replace(‘#^(RewriteRule ^.*/)?$plugin_name .*(http://.*) [QSA,L]#mi’, ‘$1 $2 [R=301,L]’, $rules); } }
  4. $custom_mod_rewrite = new custom_mod_rewrite; register_activation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); register_deactivation_hook( __FILE__, array($custom_mod_rewrite, ‘flush_rewrite_rules’)); add_action(‘generate_rewrite_rules’, array($custom_mod_rewrite, “generate_rewrite_rules”)); class custom_mod_rewrite { function __construct() { $this->wp_rewrite = & $SESSION[“wp_rewrite”]; } }

67. Which of the following is the correct code to get an array of every image uploaded to a particular post?

Answers:

  1. $images =& get_children( ‘post_type=attachment&post_mime_type=image&post_parent=10’ );
  2. $images = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
  3. $images = get_post(7, ARRAY_A);
  4. It cannot be done

68. Which of the following will echo the base URL of a WordPress site?
Answers:

  1. <?php echo get_bloginfo(‘base_url’) ?>
  2. <?php echo get_bloginfo(‘url’) ?>
  3. <?php echo get_bloginfo(‘site_url’) ?>
  4. <?php echo get_website_url() ?>

69. Which of the following functions are used when adding CSS and jQuery codes on a WordPress plugin?

Answers:

  1. wp_register_style
  2. wp_enqueue_style
  3. wp_enqueue_script
  4. None of these.

70. In order to display a widget, the user must _________________.

Answers:

  1. set the “show property” of the desired widget to “true”
  2. drag the desired widget to the side ba
  3. add the desired widget to the post
  4. change the source code

71. Which conditional tag checks if the dashboard or the administration panel is attempting to be displayed by returning «true’ (if the URL being accessed is in the admin section) or «false» (for a front-end page).

Answers:

  1. my_admin()
  2. view_admin()
  3. is_admin()
  4. root_admin()

72. How can the class name of a sub-menu be changed in the wp_nav_menu?

Answers:

  1. By manually adding the class name in Appearance—>Menus
  2. WordPress does not support the ability to change the class name of a sub-menu in the wp_nav_menu.
  3. By adding the following code in functions.php: class UL_Class_Walker extends Walker_Nav_Menu { function start_lvl(&$output, $depth) { $indent = str_repeat(«\t», $depth); $output .= «\n$indent<ul class=\»level-«.$depth.»\»>\n»; } }
  4. By adding the following code in header.php: class UL_Class_Walker extends Walker_Nav_Menu { function start_lvl(&$output, $depth) { $indent = str_repeat(«\t», $depth); $output .= «\n$indent<ul class=\»level-«.$depth.»\»>\n»; } }

72. Which of the following is a Online Code Coloring Service?

Answers:

  1. Prettify
  2. SyntaxHighligherText
  3. XEdit Pad
  4. Collabedit

73. What is the name of theme file for a page with slug ‘about’?

Answers:

  1. page-slug-about.php
  2. page-about.php
  3. about.php

74. Who of the following persons can read a post locked by password?

Answers:

  1. Only administrators, editors and authors
  2. Registered users who knows password
  3. Anyone who knows a password

75. In this stock quote api for wordpress of yahoo http://download.finance.yahoo.com/d/quotes.csv?s=GOOG&f=ll, what does ‘ s’ stand for?

Answers:

  1. Stock Format
  2. Stock Variable
  3. Stock Symbol
  4. Stock Supplier

76. Which of the following is a quick way to move a WordPress website from one server to another?

Answers:

  1. Using migration plugin
  2. Copying wordpress files and database from source to destination server
  3. Using XML export through wp-admin interface
  4. Install new wordpress and copy theme and plugin directory

77. Which of the following will remove anchors from all nodes/levels except the 4th level nodes of a WordPress category?
Parent node (1st level)
—>Child node (2nd level)
—->3rd level node
——>4th level node

Answers:

  1. .cat-item a, .cat-item .cat-item a.hover {cursor: default;} .cat-item .cat-item a.hover {cursor: pointer;}
  2. .cat-item a, .cat-item .cat-item a {cursor: default;} .cat-item .cat-item a {cursor: pointer;}
  3. .cat-item a, .cat-item .cat-item .cat-item .cat-item a {cursor: default;} .cat-item .cat-item .cat-item a {cursor: pointer;}
  4. .cat-item a, .cat-item .cat-item a:hover {cursor: pointer;} .cat-item .cat-item a:hover {cursor: default;}

78. How can an <li> tag’s class and ID attributes be removed from menu items and page lists?

Answers:

  1. add_filter(‘nav_menu_css_class’, ‘my_css_attributes_filter’, 100, 1); add_filter(‘nav_menu_item_id’, ‘my_css_attributes_filter’, 100, 1); add_filter(‘page_css_class’, ‘my_css_attributes_filter’, 100, 1); function my_css_attributes_filter($var) { return is_array($var) ? array() : »; }
  2. add_filter(‘nav_menu_css_class’, ‘my_css_attributes_filter’, 100, 1); add_filter(‘nav_menu_item_id’, ‘my_css_attributes_filter’, 100, 1); function my_css_attributes_filter($var) { if(is_array($var)){ $varci= array_intersect($var, array(‘current-menu-item’)); $cmeni = array(‘current-menu-item’); $selava = array(‘selectedmenu’); $selavaend = array(); $selavaend = str_replace($cmeni, $selava, $varci); } else{ $selavaend= »; } return $selavaend; }
  3. add_filter (‘wp_nav_menu’,’strip_empty_classes’); function strip_empty_classes($menu) { $menu = preg_replace(‘/ class=([«\’])(?!active).*?\1/’,»,$menu); return $menu; }
  4. None of the above

79.How many built-in user roles does WordPress have?

Answers:

  1. 3
  2. 4
  3. 5
  4. 6

80. How can WordPress comments be saved in Markdown format?

Answers:

  1. <?php add_filter(«hook_comment_text’, ‘Markdown’); ?>
  2. WordPress does not support the Markdown format.
  3. <?php add_filter(‘comment_text’, ‘Markdown’); ?>
  4. <?php add_filter(‘comments’, ‘Markdown’); ?>

81.Which of the of the following code snippets removes the “Home” link from the “wp_nav_menu”?

Answers:

  1. <?php add_filter(«hook_comment_text’, ‘Markdown’); ?>
  2. WordPress does not support the Markdown format.
  3. <?php add_filter(‘comment_text’, ‘Markdown’); ?>
  4. <?php add_filter(‘comments’, ‘Markdown’); ?>

82. Which of the of the following code snippets removes the “Home” link from the “wp_nav_menu”?

Answers:

  1. <? php wp_nav_menu( array(‘menu’ => ‘news’, ‘show_home’ => false)); ?>
  2. <? php wp_nav_menu( array(‘menu’ => ‘news’, ‘show_home’ =0)); ?>
  3. In functions.php following code should be added:
    function page_menu_args( $args ){
    $args[‘show_home’] = False;
    return $args;
    }
    add_filter( ‘wp_page_menu_args’, ‘page_menu_args’);
    Plus additional snippet code:
    wp_nav_menu( array(‘echo’=>true));
    }
  4. $(“div.menu > u; li:first-child”).css(“display”,”none”);

82. Which of the following will change the default ordering of categories in the WordPress post edit page?

Answers:

  1. Adding ‘checked_ontop’ => FALSE to the args in wp_terms_checklist() in the functions.php file
  2. Disabling category ordering in the WordPress admin settings
  3. Setting category_ordering=false in the wp-config.php file
  4. Adding ‘category_ordering’ => FALSE to the args in wp_terms_checklist() in the functions.php file

83. Which of the following will make a custom query in a WordPress plugin?

Answers:

  1. <?php $wpdb->query(‘query’); ?>
  2. <?php $query = new WP_Query( ‘author=2,6,17,38’ ); ?>
  3. <?php wp_reset_query(); ?>
  4. <?php $wpdb->query(‘select * from my_plugin_table where foo = «bar»‘); ?>

84. Is the functions.php file required in each theme?

Answers:

  1. Yes
  2. No

85. In a WordPress multisite, how can a new blog site be added from the Network Admin panel?

Answers:

  1. do_action (‘wpmu_blog’, $blog_id, $user_id, $domain, $path, $site_id, $meta);
  2. define (‘WP_ALLOW_MULTISITE’, true);
  3. do_action (‘wpmu_blog’, $blog_id, $user_id, $domain, $path, $site_id, $meta);
  4. do_action (‘wpmu_new_blog’, $blog_id, $user_id, $domain, $path, $site_id, $meta);

86. Which of the following categories of persons can read a post locked by password?

Answers:

  1. Only administrators, editors and authors.
  2. Registered users who know a password.
  3. Anyone who knows a password.
  4. do_action (‘wpmu_new_blog’, $blog_id, $user_id, $domain, $path, $site_id, $meta);

87.Which deprecated functions are still in use in WordPress?

Answers:

  1. register_globals()
  2. magc_quotes()
  3. addslashers()
  4. get_permalink()

88. Which of the following is the best way to highlight the syntax on a blog created on wordpress.com?

Answers:

  1. <div class=”highlight”> {your code} </div>
  2. [color:red] {your code} [/color]
  3. install syntax highlight plugin
  4. [sourcecode language=’php’]{your code}[/sourcecode]

89. How do you check a WordPress function does if you see it for the first time?

Answers:

  1. Browse the Codex.
  2. Look at the source code.]
  3. install syntax highlight plugin
  4. [sourcecode language=’php’]{your code}[/sourcecode]

90. What is the name of the table in database which stores custom fields data?

Answers:

  1. wp_custommeta
  2. wp_options
  3. wp_terms
  4. wp_postmeta

91. How you retrieve an array of all the post tags?

Answers:

  1. get_terms(‘post_tag’, array(‘hide_empty’ => false));
  2. get_terms(array(‘taxonomy’ => ‘post_tag’, ‘hide_empty’ => false));
  3. get_term();
  4. wp_terms()
  5. wp_terms_checklist();

92. When should the wp_kses function for Data Validation be run?

Answers:

  1. At the time of form submission
  2. Before the data is saved in the database.
  3. before the data is being rendered on the webpage

93. “X people have seen this post” should be output like this:

Answers:

  1. printf( _n( ‘%d person has seen this post.’, ‘%d people have seen this post.’, $view_count ), $view_count );
  2. printf( __( ‘%d people have seen this post.’ ), $view_count );
  3. echo _n( ‘One person has seen this post’, “$view_count people have seen this post.” );
  4. printf( _n( ‘%d person has seen this post.’, ‘%d people have seen this post.’ ), $view_count );
  5. printf( 1 == $view_count ? __( ‘%d person has seen this post.’ ) : __( ‘%d people have seen this post.’ ), $view_count );

94. What WordPress function would you use to retrieve the name of the current action?

Answers:

  1. current_filter
  2. current_action_name
  3. current_hook

95. What are the correct ways for displaying post title wrapped into H1 tag?

Answers:

  1. <?php the_title( ‘<h1>’, ‘</h1>’ ); ?>
  2. <h1><?php get_the_title(); ?>
  3. <?php the_title( ‘<h1>’, ‘</h1>’, ‘display_title’ ); ?>
  4. <h1>?php the_title(); ?></h1>

96. Display the current pagination number.

Answers:

  1. $page = get_page(‘1’);
    echo ‘Current page: ’ . $page->post_paged;
  2. $paged = get_query_var(‘paged’, 1);
    echo ‘Current page: ’ . $paged;
  3. $page = get_post(‘1’);
    echo ‘Current page: ’ . $page->post_paged;

97. Display the current pagination number.

Answers:

  1. $page = get_page(‘1’);
    echo ‘Current page: ’ . $page->post_paged;
  2. $paged = get_query_var(‘paged’, 1);
    echo ‘Current page: ’ . $paged;
  3. $page = get_post(‘1’);
    echo ‘Current page: ’ . $page->post_paged;

98. What is the WordPress way of adding a query variable to an URL

Answers:

  1. site_url(‘?’ . $foo . ‘=’ . $bar);
  2. home_url(‘$’ . $foo . ‘=’ . $bar);
  3. add_query_arg($foo, $bar, home_url());

99. When is it recommended to rebuild the $wp_rewrite object with the flush_rewrite_rules() function?

Answers:

  1. once in a while
  2. after every one hour
  3. on every custom post type page load
  4. after activatation and deactivation of a custom post types plugin

100. What is the difference between filters and actions?

Answers:

  1. An action is defined as a function that takes in some kind of input, modifies it, and then returns it whereas a filter is just a place where you call a function, and you don’t really care what it returns
  2. A filter is defined as a function that takes in some kind of input, modifies it, and then returns it whereas an action is just a place where you call a function, and you don’t really care what it returns
  3. There is no difference. Both are used for hooking into an action.

101. Which HTML tags are not allowed to be used in a post comment?

Answers:

  1. code
  2. form
  3. img
  4. strike
  5. table

102. Which of the following is the correct way to register shortcode?

Answers:

  1. function foobar_func ( $atts ){
    return “foo and bar”;
    }
    new_shortcode( ‘foobar’, ‘foobar_func’ );
  2. function foobar_func ( $atts ){
    return “foo and bar”;
    }
    insert_shortcode( ‘foobar’, ‘foobar_func’ );
  3. function foobar_func ( $atts ){
    return “foo and bar”;
    }
    register_shortcode( ‘foobar’, ‘foobar_func’ );
  4. function foobar_func ( $atts ){
    return “foo and bar”;
    }
    add_shortcode( ‘foobar’, ‘foobar_func’ );

103. If you need to store information temporarily, which WordPress system would you use:

Answers:

  1. Options
  2. Meta tables
  3. Transients
  4. The REST API

104. What is true about the_meta() function?

Answers:

  1. This is a function for displaying custom fields for the current post, known as the “post-meta” (stored in the wp_postmeta table).
  2. It formats the data into an unordered list.
  3. It may be used outside the loop.
  4. the_meta() will ignore meta_keys (i.e. field names) that begin with an underscore.

105. Is it possible to retrieve list of custom taxonomy terms with get_terms() function?

Answers:

  1. Yes
  2. No

106. Which WP global object is used to execute custom database queries?

Answers:

  1. $wpdb
  2. $wp_db
  3. $db_query
  4. $wp_query

107. What are WordPress hooks?

Answers:

  1. Setting options available to WordPress administrators.
  2. Security functions that run inside WordPress
  3. Group of plugins which control WordPress behavior.
  4. Ways to change the default behavior of WordPress.

108. Which from below are default post types in WordPress and are readily available to users or internally used by the WordPress installation by default:

Answers:

  1. Post
  2. Page
  3. Links
  4. Attachment
  5. Revision
  6. Comments
  7. Navigation menu

109. Which of the following is an example of a WordPress plugin that provides pagination capabilities?

Answers:

  1. Page Break
  2. Page Generator
  3. WP-PageNavi
  4. Page-list

110. Which of the following is not a WordPress role?

Answers:

  1. System
  2. Subscriber
  3. Administrator
  4. Editor

111. Is it possible to disable the trash and delete the posts immediatelly?

Answers:

  1. No.
  2. Yes, via a define in wp-config.php: define(‘EMPTY_TRASH_DAYS’, 0);
  3. Yes, via a define in wp-config.php: define(‘EMPTY_TRASH_DAYS’, 0);

112. Select all the WordPress supported audio formats.

Answers:

  1. aiff
  2. mp3
  3. ogg
  4. flac
  5. wma
  6. wav

113. Sometimes you might want to disable all the automatic background updates of WordPress, extensions, themes and languages. How would you accomplish that?

Answers:

  1. via a define in wp-config.php: define(‘AUTOMATIC_UPDATER_DISABLED’, true);
  2. with a filter: add_filter(‘automatic_updater_disabled’, ‘__return_true’);
  3. I’m using git, so I would use a special filter:
    add_filter(‘automatic_updates_is_vcs_checkout’, ‘__return_false’, 1);

114. How do you know if a WordPress action has been previously fired?

Answers:

  1. Using the has_action(‘my_action’) function.
  2. Using the did_action(‘my_action’) function.
  3. Using the current_filter function.

115. What is the correct way for displaying navigation menu called “Primary Menu”?

Answers:

  1. wp_nav_menu( array(
    ‘menu’ => ‘Primary Menu’
    ) );
  2. wp_navigation_menu( array(
    ‘menu’ => ‘primary-menu’
    ) );
  3. wp_navigation( array(
    ‘menu’ => ‘Primary Menu’
    ) );
  4. wp_menu( array(
    ‘menu’ => ‘primary-menu’
    ) );

116. How you determine if a script has been enqueued correctly?

Answers:

  1. has_enqueue_script(‘my-script-handle’);
  2. wp_script_is(‘my-script-handle’, ‘enqueued’);
  3. is_script_loaded(‘my-script-handle’);

117. Which of the following is incorrect possible value for $show attribute of bloginfo($show) function?

Answers:

  1. ‘name’
  2. ‘description’
  3. homeurl’
  4. ‘admin email’

118. How to display the value of a post meta field named my_custom?

Answers:

  1. $post_meta = get_post_meta($post->ID, ‘my_custom’, true);
    echo $post_meta;
  2. $post_meta = get_post_meta($post->ID);
    echo $post_meta;
  3. echo get_meta($post->ID, ‘my_custom’);

119. Is it possible to create posts programmatically?

Answers:

  1. No
  2. Yes, with wp_insert_post() function
  3. Yes, with wp_add_post() function
  4. Yes, with wp_create_post() function

120. What type of hook is wp_meta

Answers:

  1. Action Hook
  2. Filter Hook

121. Is it possible to bypass trash and force deletion with wp_delete_post() function?

Answers:

  1. No
  2. Yes

122. Retrieve all the post types that support thumbnails or excerpts.?

Answers:

  1. get_post_type(array(‘supports’ => array(‘thumbnail’, ‘excerpt’)), ‘names’, ‘or’);
  2. post_type_supports(‘post’, array(‘thumbnail’, ‘excerpt’), ‘or’);
  3. get_post_types_by_support(array(‘thumbnail’, ‘excerpt’), ‘or’);

123. What is the name of self-hosted version of WordPress?

Answers:

  1. WordPress.com
  2. WordPress.org
  3. Open Source WordPress
  4. WordPress online

124. Where can you change the Timezone used by WordPress in the dashboard?

Answers:

  1. In Settings > Media
  2. In Settings > General
  3. In Settings > Reading
  4. In Settings > Writing

125. Select all the default taxonomies in WordPress.

Answers:

  1. post_category
  2. post_tag
  3. link_category
  4. product_tag
  5. post_format
  6. category

126. Which files are a minimum required by a theme to function?

Answers:

  1. style.css and functions.php
  2. style.css and index.php
  3. index.php and functions.php
  4. index.php, functions.php and style.css

127. What is WordPress multisite?

Answers:

  1. Special version of WordPress that can support many sites and is not free.
  2. WP configuration feature that supports multiple sites.
  3. A WP plugin that supports multiple sites.
  4. A popular WP theme that supports multiple sites.

128. How do you enable the Network Setup menu item(enable Multisite) in WordPress?

Answers:

  1. Install WP MU plugin
  2. Activate WP Multisite in Settings menu
  3. Set WP_ALLOW_MULTISITE as true in wp-config.php
  4. WP MU has been discontinued as a separate project so there is no way to set up multisites in WP now

130. How would you extend the time of the WordPress login session?

Answers:

  1. add_filter( ‘auth_cookie_expiration’, ‘stay_logged_in_for_1_year’ );
    function stay_logged_in_for_1_year( $expire ) {
    return 31556926; // 1 year in seconds
    }
  2. add_filter(‘auth_cookie’, ‘stay_logged_in_for_1_year’);
    function stay_logged_in_for_1_year($expire) {
    return 31556926;
    }
  3. add_filter(‘secure_logged_in_cookie’, ‘stay_logged_in_for_1_year’);
    function stay_logged_in_for_1_year($expire) {
    return 31556926;
    }

131. Which of these are a part of WordPress API?

Answers:

  1. Theme Modification API
  2. Metadata API
  3. Theme Update API
  4. Settings API
  5. Options API
  6. Theme Customization API
  7. User API
  8. Update API

132. Which of these are a part of WordPress API?

Answers:

  1. Theme Modification API
  2. Metadata API
  3. Theme Update API
  4. Settings API
  5. Options API
  6. Theme Customization API
  7. User API
  8. Update API

133. Which concept does WordPress uses to control user access to different features?

Answers:

  1. Username
  2. Access tokens
  3. Role
  4. Cookies

134. Which constant is NOT recognized in wp-config.php?

Answers:

  1. WP_SITEURL
  2. WP_CONTENT_DIR
  3. WP_CONTENT_URL
  4. WP_HOME_URL

135. What is the default table prefix in WP?

Answers:

  1. _wp
  2. w_
  3. wp_
  4. wp-

136. Which is the most important file that should be deleted from your WordPress install directory once you’ve completed setup?

Answers:

  1. setup-example.xml
  2. wp_config_sample.php
  3. wp-config-sample.php
  4. wp-setup-sample.php

137. Display an Admin Notice in a Network Admin Dasboard of a WordPress multi site install.

Answers:

  1. function my_network_admin_notice() {
    echo ‘<div class=»updated»><p>Network Admin Dashboard Notice!</p></div>’;
    }
    add_action(‘admin_notices’, ‘my_network_admin_notice’);
  2. function my_admin_notice() {
    echo ‘<div class=»updated»><p>Network Admin Dashboard Notice!</p></div>’;
    }
    add_action(‘network_admin_notice’, ‘my_admin_notice’);
  3. function my_notice() {
    echo ‘<div class=»updated»><p>Network Admin Dashboard Notice!</p></div>’;
    }
    add_action(‘network_admin_notices’, ‘my_notice’);

137. You need a single post meta value in a bigger post loop and you need it only one time, and you want it to be as fast as possible. How would you proceed?

Answers:

  1. Of course, get_post_meta($post->ID, ‘post_meta’, true); — пока это, помечать оценку.
  2. I would use a direct query like: $wpdb->get_var($wpdb->prepare(«SELECT meta_value from $wpdb->postmeta WHERE post_id = %d and meta_key = ‘post_meta’”, $post->ID));
  3. I would use a direct query like: $wpdb->get_results($wpdb->prepare(«SELECT * from $wpdb->postmeta WHERE meta_key = %s”, ‘post_meta’));

138. How do you enable debug mode in WP?

Answers:

  1. By going to Dashboard > Settings > General and then enable debug mode
  2. By setting WP_DEBUG as true in wp-config.php
  3. It is enabled by default

139. What are the default plugins installed in the WordPress?

Answers:

  1. Contact form7
  2. Akismet
  3. All in one SEO
  4. Hello Dolly

140. What are the default plugins installed in the WordPress?

Answers:

  1. wp_update_user
  2. wp_create_user
  3. register_new_user
  4. wp_insert_user

141. Which of the following functions check if current visitor is a logged in user?

Answers:

  1. is_visitor_logged_in ( );
  2. is_user_logged_in ( );
  3. if_user_logged_in ( );
  4. is_user_logged ( );

142. Which one of the following files is located in the root of your WordPress installation directory and contains your website’s setup details, such as database connection info?

Answers:

  1. setup.html
  2. wp-setup.php
  3. wp-config.php
  4. wp-install.php

143. What can the Contributor role do?

Answers:

  1. Moderate comments
  2. Publish posts
  3. Edit posts
  4. Edit pages

144. What is common to all these functions: next_post, previous_post, link_pages, the_author_url, wp_get_link?

Answers:

  1. They all return URLs
  2. They are all deprecated
  3. They all point to posts or post lists
  4. They all echo something

145. Pick the correct default Post Types readily available to users or internally used by the WordPress installation.

Answers:

  1. Post
  2. Page
  3. Blog
  4. Archive
  5. Category

146. Where can you set a static page as the front page in WP?

Answers:

  1. In wp-config.php
  2. In Dashboard->Settings->Reading
  3. In Dashboard->Settings->General
  4. In Dashboard->Appearance

147. How do you check if the current user has the role “administrator”?

Answers:

  1. current_user_can_do(‘manage_options’);
  2. is_admin();
  3. current_user_can(‘administrator’);
  4. current_user_can_do(‘manage’);
  5. in_array(‘administrator’, wp_get_current_user()->roles);

148. Which of the following is true about bloginfo(‘url’); function?

Answers:

  1. Displays URL of the active theme’s directory.
  2. Displays the “Site address (URL)” set in Settings > General. This data is retrieved from the “home” record in the wp_options table.
  3. Displays the current post URL.
  4. Displays the “WordPress address (URL)” set in Settings > General. This data is retrieved from the “siteurl” record in the wp_options table.

149. Clean up a comma-separated list of post ids. Example list:
1254,9930,10974,”192”,9930,192

Answers:

  1. array_map(‘absint’, ’1254,9930,10974,”192”,9930,192’);
  2. explode(1254,9930,10974,”192”,9930,192);
  3. wp_parse_id_list(1254,9930,10974,”192”,9930,192);

150. Clean up a comma-separated list of post ids. Example list:
1254,9930,10974,”192”,9930,192
Answers:

  1. array_map(‘absint’, ’1254,9930,10974,”192”,9930,192’);
  2. explode(1254,9930,10974,”192”,9930,192);
  3. wp_parse_id_list(1254,9930,10974,”192”,9930,192);

151. How many WordPress posts can you create?

Answers:

  1. WordPress recommends less than 10,000 posts.
  2. WordPress is limited to 1,000 posts.
  3. WordPress has not set any limit.
  4. WordPress is limited to 1,00,000 posts.

152. You need to include a link in a sentence. How can you do that?
1254,9930,10974,”192”,9930,192

Answers:

  1. _e( ‘Publish something using our <a href=»http://support.wordpress.com/post-by-email/»>Post by Email</a> feature.’ );
  2. printf( __( ‘Publish something using our <a href=»%s»>Post by Email</a> feature.’), ‘http://support.wordpress.com/post-by-email/’ );
  3. printf( __( ‘Publish something using our %s feature.’ ), sprintf( ‘<a href=»http://support.wordpress.com/post-by-email/»>%s</a>’, __( ‘Post by Email’ ) ) );

153. Assuming we are using ‘wp_’ as the database table prefix, in which table are all the custom fields related to a post stored?

Answers:

  1. wp_posts
  2. wp_postmeta
  3. wp_terms

154. Which is the default site update service that WordPress automatically notifies when you publish a new post?

Answers:

  1. http://rpc.pingomatic.com
  2. http://google.com
  3. http://ping.feedburner.com
  4. http://www.feedsubmitter.com

155. Which of the following is not a default image size in WP?

Answers:

  1. Small Size
  2. Medium Size
  3. Large Size
  4. Thumbnail Size

155. What is a permalink?

Answers:

  1. Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings.
  2. The numeric IP address of your WordPress site.
  3. The complete URL of your WordPress site.
  4. A popular WordPress plugin.

156. How many WordPress themes can be installed in a single WordPress installation?

Answers:

  1. 1
  2. 10
  3. 100
  4. Unlimited

157. Arrange the following templates in decreasing order of priority from left to right for Site Front Page:
index.php
front-page.php
home.php

Answers:

  1. index.php, front-page.php, home.php
  2. front-page.php, home.php, index.php
  3. home.php, front-page.php, index.php
  4. front-page.php,index.php home.php

158. Which of the following files in a WP theme is NOT a file required by the theme review team for acceptance into the WordPress.org theme directory?

Answers:

  1. page.php
  2. style.css
  3. index.php
  4. comments.php
  5. screenshot.png

159. What database does WordPress use?

Answers:

  1. Notes
  2. PostgreSQL
  3. MySQL
  4. Oracle

160. Select all of the supported page statuses in WordPress.

Answers:

  1. draft (Draft)
  2. pending (Pending Review)
  3. private (Private)
  4. publish (Published)

161. Which of the following strings is not a default WordPress post format slug?

Answers:

  1. aside
  2. image
  3. quote
  4. status

162. Which hook can be used to update kses and TinyMCE to allow select new attributes for an HTML element?

Answers:

  1. tool_box
  2. tiny_mce_before_init
  3. tiny_mce_plugins
  4. htmledit_pre

163. Where plugins options are stored in WordPress?

Answers:

  1. They are stored in WordPress theme folder.
  2. They are stored in WordPress plugins folder.
  3. They are stored in WordPress.org and not on your site.
  4. They are stored in WordPress Database.

164. When adding a function to the “the_content” hook, where will you see changes?

Answers:

  1. On the blog list page.
  2. On the single post page.
  3. It depends on how your theme is set up.
  4. On the archive page.

165. Which standard WP class do you need to necessarily extend to create your widget?

Answers:

  1. WP_Widget
  2. WP_Widget_Form_Customize_Control
  3. WP_Customize_Control
  4. WP_Customize_Sidebar_Section

166. Which of the following is true about wp_mail() function?

Answers:

  1. A true return value does not automatically mean that the user received the email successfully.
  2. For this function to work, the settings SMTP and smtp_port (default: 25) need to be set in your php.ini file.
  3. The default content type allows using HTML.
  4. The function can handle only one email as $to parameter.

167. Which hook fires after WordPress has finished loading but before any headers are sent?

Answers:

  1. activate_wp_head
  2. init
  3. activate_header
  4. xmirpc_call

168. Which loop is used by default to fetch the posts and loop through them?

Answers:

  1. for loop
  2. while loop
  3. foreach loop

169. Pick the default template tag(s).

Answers:

  1. the_field()
  2. wp_title()
  3. wp_field()

170. Arrange the following templates in decreasing order of priority from left to right used to display the posts on a Category page.
index.php
category.php
archive.php
category-ID.php
category-slug.php

Answers:

  1. category-ID.php, category-slug.php, category.php, archive.php, index.php
  2. category-slug.php, archive.php, category.php, category-ID.php, index.php
  3. index.php, category.php, archive.php, category-ID.php, category-slug.php
  4. category-slug.php, category-ID.php, category.php, archive.php, index.php

171. Which function should be used to insert a post title into the title attribute of an HTML element?

Answers:

  1. get_the_title( );
  2. the_title_attribute( );
  3. the_title( );

172. Which of the following is/are NOT the default abstract methods available in the Walker class for menus?

Answers:

  1. start_lvl( )
  2. end_lvl( )
  3. start_li( )
  4. end_li( )

173. What does wp_rand() function?

Answers:

  1. Gets random post ID.
  2. Gets random category ID.
  3. Generates a random post ID for wp_insert_post() function.
  4. Generates a random number.

174. Is it possible to update posts programmatically?

Answers:

  1. Yes, with wp_edit_post( ) function.
  2. Yes, with wp_update_post( ) function.
  3. Yes, with wp_change_post( ) function.
  4. No.

175. Where do you change theme name and author details?

Answers:

  1. style.css file in the theme folder
  2. index.php file in the theme folder
  3. readme.txt file in the theme folder

176. What is the correct order of priority in decreasing order from left to right for Custom Post Type template files?

Answers:

  1. single-{post-type}-{slug}.php, single-{post-type}.php, single.php, singular.php, index.php
  2. single-{post-type}.php, single-{post-type}-{slug}.php, single.php, singular.php, index.php
  3. single-{post-type}.php, single.php, singular.php, single-{post-type}-{slug}.php, index.php
  4. single-{post-type}.php, single.php, singular.php, single-{post-type}-{slug}.php, index.php

177. Which default WP function can be used to assign different classes to the body element?

Answers:

  1. body_class( )
  2. get_body_classes( )
  3. get_theme_support( )
  4. sanitize_html_class( )

178. What is the name of theme file for a page with slug ‘about-us’?

Answers:

  1. about-us.php
  2. page-about-us.php
  3. page-about.php
  4. about-us-page.php

179. Which of the following is the correct way to display featured image of post?

Answers:

  1. echo get_the_post_thumbnail($page->ID, ‘thumbnail’);
  2. echo get_the_featured_image($page->ID, ‘thumbnail’);
  3. the_post_thumbnail($page->ID, ‘thumbnail’);
  4. the_featured_image($page->ID, ‘thumbnail’);

180. How will you check if a page exists for a given URL?

Answers:

  1. get_page_by_path( )
  2. get_page_url( )
  3. get_page_link( )
  4. get_page_uri( )

181. Which of these would be the correct way to output the escaped username in a sentence?

Answers:

  1. <?php scanf( __( ‘Howdy, %s’ ), $username ); ?>!
  2. <?php echo __( ‘Howdy’ ) . ‘, ‘ . $username; ?>!
  3. <?php printf( __( ‘Howdy, %s!’ ), $username ); ?>
  4. <?php _e( «Howdy, $username!» ); ?>
  5. <?php _e( ‘Howdy, %s!’, $username ); ?>

182.User Level 10 converts to _________?

Answers:

  1. Contributor
  2. Author
  3. Editor
  4. Subscriber
  5. Administrator

183.Which of the following snippets disable depreciated warnings in WordPress like this one ?
«Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647»

Answers:

  1. define(E_DEPRECATED, false);
  2. error_reporting(E_ALL ^ E_DEPRECATED);
  3. define(E_NOTICE, false);
  4. error_reporting(WP_DEBUG, true)
  5. Administrator

184.Select all the default post types in WordPress.

Answers:

  1. post
  2. page
  3. attachment
  4. revision
  5. nav_menu_item

185.Which of the following is the correct way for enabling support for Post Thumbnails?

Answers:

  1. add_theme_support( ‘thumbnails’ );
  2. add_support( ‘post-thumbnails’ );
  3. add_theme_support( ‘post-thumbnails’ );
  4. theme_support( ‘thumbnails’ );

186.Which function(s) can be used to programatically create a new user in WordPress?

Answers:

  1. wp_update_user
  2. wp_create_user
  3. register_new_user
  4. wp_insert_user

187.Which function(s) can be used to programatically create a new user in WordPress?

Answers:

  1. Blogger
  2. Author
  3. Subscriber
  4. Contributor

32,225 total views, 7 views today