wordpress_add

Monday, 9 September 2013

Custom widget Area In wordpress

Locate functions.php in your active theme folder and add the bellow code in it.


if ( function_exists('register_sidebar') )

    register_sidebar(array(


        'name' => 'recent posts',


'id'=>'recent',


        'before_widget' => '',


        'after_widget' => '',


        'before_title' => '',


        'after_title' => '',


    ));



if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('recent') ) : ?>


     <p>This is what shows when no widgets are added.</p>      


<?php 
endif; ?>



Subscribe us for Important Knowledge of word press.Your's suggestions are most welcomed..


1 comment: