'Footer Area', 'id' => 'ridolfi_footer_widget', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', ) ); } add_action( 'widgets_init', 'ridolfi_widgets_init' ); function ridolfi_side_widgets_init() { register_sidebar( array( 'name' => 'Sidebar Area', 'id' => 'ridolfi_sidebar_widget', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); } add_action( 'widgets_init', 'ridolfi_side_widgets_init' ); //Blog sidebar add_action( 'widgets_init', 'ridolfi_blog_sidebar' ); function ridolfi_blog_sidebar() { register_sidebar( array( 'name' => __( 'Ridolfi Blog Sidebar', 'abaya' ), 'id' => 'sidebar-blog', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', )); /* * THE REST OF THE SIDEBAR REGISTRATION CODE FROM twentyten_widgets_init() GOES HERE */ } /** * Adds Foo_Widget widget. */ class Redolfi_cat_Widget extends WP_Widget { /** * Register widget with WordPress. */ function __construct() { parent::__construct( 'ridolfi_widget', // Base ID __( 'Ridolfi product category', 'abaya' ), // Name array( 'description' => __( 'Display custom product category', 'abaya' ), ) // Args ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; }?>

__( 'Display post with image', 'abaya' ), ) // Args ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; }?> query('post_type=post&posts_per_page='.$instance['total_post'].''); if($listings->found_posts > 0) {?> '; while ($listings->have_posts()) { $listings->the_post(); $image = (has_post_thumbnail($post->ID)) ? get_the_post_thumbnail($post->ID, 'realty_widget_size') : ''; $listItem = '
  • ' . $image.'
    '; $listItem .= ''; $listItem .= get_the_title() . ''; $listItem .= '' . get_the_date() . '
  • '; echo $listItem; } echo ''; wp_reset_postdata(); }else{ echo '

    No listing found

    '; }?>

    'Contact Form', 'id' => 'ridolfi_contact_form', 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '
    ', 'after_title' => '
    ', ) ); } add_action( 'widgets_init', 'customcontact_ridolfi_widgets_init' ); ?>'.$text.'

    '; } // Check if textarea is set if( $textarea ) { echo '

    '.$textarea.'

    '; }?>
    ADDRESS

    '.$address.'

    '; }?>

    PHONE

    '.$phone.'

    '; }?>

    SKYPE

    '.$skype.'

    '; }?>

    EMAIL

    '.$email.'

    '; }?>