Wednesday, March 19, 2014

Is WordPress good for Google ranking and SEO?

Ans Yes, That is one of the major selling points of using WordPress is that it includes excellent built in search engine optimization (SEO).In Other CMS you have to install SEO extention they either free or Commercial.In WordPress you can also extend SEO feature by using some Nice FREE SEO plugins likes All in one SEO,Yoast These are popular plugins that are known to help your rank on search engines such as Google and Bing.

How many tables a default WordPress will have?

Ans If developer work with database then he/she must know how many table install with default wordpress.
A default wordpress will have 11 tables. They are-
1. wp_commentmeta
2. wp_comments
3. wp_links
4. wp_options
5. wp_postmeta
6. wp_posts
7. wp_terms
8. wp_term_relationships
9. wp_term_taxonomy
10.wp_usermeta
11.wp_users

Basic functions then we generally used in WordPress? Why?

Ans: If developer have good knowledge then he/she must know this function name at-least 3-5
1. is_page() :- Condition for check if page is displayed. Its return true or false.
2. wp_nav_menu() :- Enabling WordPress 3.0′s Navigation Menu Feature
3. wp_list_pages() :- Listing All Pages
4. get_excerpt() :- Displays the excerpt of the current post with read more link for display full post.
5. is_category() :- Condition for check if category is displayed. Its return true or false.
6. the_title():- Displays the title of the current post
7. the_content():- Displays the contents of the current post.
8. bloginfo(‘url’) :- Getting the Site’s URL
9. bloginfo(‘template_url’) :- Getting the URL to the Current Theme
10.the_time():- Display the time the post was published (uses PHP date formatting as a parameter):

How we will pass a variable by value in WordPress.

Its same like we will work in c,c++
$p = &$s

Given

$email = ‘bob@example.com’;

which code block will output example.com?

A. print substr($email, -1 * strrpos($email, ‘@’));

B. print substr($email, strrpos($email, ‘@’));

C. print substr($email, strpos($email, ‘@’) + 1);

D. print strstr($email, ‘@’);


Answer C is correct. strpos() identifies the position of the @ character in the

string.To capture only the domain part of the address, you must advance one place

to the first character after the @.

What will the following script output?

<?php

$a = array (‘a’ => 20, 1 => 36, 40);

array_rand ($a);

echo $a[0];

?>
A. A random value from $a

B. ‘a’

C. 20

D. 36

E. Nothing


ANSWER E Only E is correct.The $a array doesn’t have any element with a numeric key of

zero, and the array_rand() function does not change the keys of the array’s elements—

only their order.

Which of the following functions can be used to sort an array by its keys in descending order?

A. sort

B. rsort

C. ksort

D. krsort

E. reverse_sort

Answer D is correct.