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

Google Adwords, Analytics Certifications
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

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

Google Adwords, Analytics Certifications
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.

Which of the following will echo the base URL of a WordPress site?

Google Adwords, Analytics Certifications
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() ?>

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

Google Adwords, Analytics Certifications
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

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

Google Adwords, Analytics Certifications
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”]; } }

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

Google Adwords, Analytics Certifications
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

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.

Google Adwords, Analytics Certifications
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