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