WordPress Interview Questions and Answers


1. what is WordPress.
Wordpress is a CMS (Content Management System) based on php and mysql. Its free and open source blogging tool. Its now most popular blogging tool on internet network.

The main reason for its popularity is the administrator panel is very user friendly, easy to use and manageable for the layman user.

2. What is current version of wordpress.
The wordpress 3.5.2 version released in June 2013.

3. What are the features of wordpress.

  1. Simplicity, make wordpress very easy to use for everyone.
  2. Free open source.
  3. Easy to install.
  4. There are lots of free as well as paid theme to use.
  5. Extends with plugins, we can extends the functionality of wordpress using thousands of free plugins or will create any plugin according to your requirements.
  6. Multilingual, wordpress is available on more than 70 languages.
  7. Multisite, create a child website along with the parent site with the same URL and admin panel.
  8. Flexibility, with wordpress you will create any type of blog or website.
  9. Comment, the built in comment system also make wordpress popular as you can comment your views on website.
  10. Full standards compliance, XML-RPC interface, easy importing, cross-blog communication tools. Continue reading
Advertisements

PHP Interview Questions and Answers


1. What’s PHP ?

The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.

2. How can we know the number of days between two given dates using PHP?

$date1 = date(‘Y-m-d’);
$date2 = ‘2006-07-01’;
$days = (strtotime($date1) – strtotime($date2)) / (60 * 60 * 24);
echo “Number of days since ‘2006-07-01’: $days”;

3. How do you define a constant?

define (“MYCONSTANT”, 100);

4. What is meant by urlencode and urldecode?

urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits.
For example:
urlencode(“10.00%”) will return “10%2E00%25”. URL encoded strings are safe to be used as part of URLs.
urldecode() returns the URL decoded version of the given string. Continue reading

Register your Custom Sidebar


To register your own custom sidebar in wordpress, you just need to write the following code inside “twentytwelve_widgets_init()” function which is present in functions.php in your theme folder.

register_sidebar( array(
 'name' => __( 'your sidebar name', 'twentytwelve' ),
 'id' => 'sidebar-4',    // must be unique 
 'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ),
 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
 'after_widget' => '</aside>',
 'before_title' => '<h3 class="widget-title">',
 'after_title' => '</h3>',
 ) );

after adding this code in your functions.php, go to your admin panel and you will get your custom sidebar.

To call your sidebar inside your template file just write the following code.

<?php dynamic_sidebar( 'sidebar-4' ); ?>

Count Down Timer


Karthick M

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Day Counter</title>
<style type=”text/css”>
body {
margin:0px;
padding:0px;
font-family:Tahoma, Geneva, sans-serif;
}
.title {
display:block;
text-align:center;
padding:10px;
background:#CCCCCC;
width:500px;
margin:10px auto;
}
.number-box {
width:182px;
height:150px;
font-size:80px;
color:#FFFFFF;
font-weight:bold;
text-align:center;
line-height:150px;
background:#0066CC;
border-radius:12px;
}
</style>
http://”jquery-1.7.2.min.js”
<script>

View original post 291 more words

JavaScript Content Typewriter


Karthick M

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
<style type=”text/css”>
body {
background:#333333;
font-family:Arial, Helvetica, sans-serif;
}
.text-container {
width:400px;
padding:10px;
font-size:12px;

View original post 138 more words

An Introduction To The CSS3 Multiple Column Layout Module


Joliet Junior College-Web Design Certificate


Tutorial Details

Topic: CSS3 Column Layout

Difficulty: Beginner

DownloadSOURCE FILES

DemoVIEW IT ONLINE

The Multi Column Layout Module has been introduced to help us create columns quickly and easily using CSS3 only. In this tut I’m going to be taking a look at some of its properties and demonstrate them through a series of examples.

 

Introduction

Anyone who has tried to create multiple columns in the past using CSS will already know that this type of layout has been achievable for a long time. However, this has often resulted in the use of hacky techniques and floats. More often that not this has been quite time consuming and definitely not the easiest of layouts to create. The truth is creating multiple columns using CSS has been an extremely awkward process up until now. The multi column layout module offers more flexibility and control over previous CSS methods.

The new…

View original post 1,949 more words

Display List of Post other than which is open from one category


<div>
<?php
if ( is_single() )
{
$cats = wp_get_post_categories($post->ID);
if ($cats)
{
$first_cat = $cats[0];
$args=array(
'cat' => $first_cat, //cat__not_in wouldn't work
'post__not_in' => array($post->ID),
'showposts'=>5,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() )
{
echo '<h3 class="widget-title" style="height:40px;">Related Posts</h3>';
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<div style="height:85px; font-size:14px; color:#555555; font-weight:bold; line-height:22px;">
<?php if(catch_that_image() == '/images/default.jpg'): ?>
<img src="<?php echo esc_url( home_url( '/' ) ); ?>/wp-content/uploads/2013/05/default.jpg" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" align="left" hspace="5" width="105" />
<div style="padding-left:115px;">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" style=" text-decoration:none; color:#333;">
<?php the_title(); ?>
</a>
</div>
<?php else : ?>
<img src="<?php echo catch_that_image();?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" align="left" hspace="5" width="105" />
<div style="padding-left:115px;">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" style=" text-decoration:none; color:#333;">
<?php the_title(); ?>
</a>
</div>
<?php endif; ?>
</div>
<?php endwhile;
}
}
wp_reset_query(); // Restore global post data stomped by the_post().
}
?>
</div>

In this code above I have used catch_that_image() function. This function is used to display the image which is present in the post to the listing page. For the function click here.