May 1, 2014 at 3:03 am
#9887
Theme Horse Support Team
Keymaster
Hi DD
you can change the code from attitude->library->widgets->attitude_widget.php
On line no 319 there is a function
function widget( $args, $instance ) {
extract( $args );
extract( $instance );
global $post;
$title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : '';
$text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance );
$page_array = array();
for( $i=0; $i<6; $i++ ) {
$var = 'page_id'.$i;
$page_id = isset( $instance[ $var ] ) ? $instance[ $var ] : '';
if( !empty( $page_id ) )
array_push( $page_array, $page_id );// Push the page id in the array
}
$get_featured_pages = new WP_Query( array(
'posts_per_page' => -1,
'post_type' => array( 'page' ),
'post__in' => $page_array,
'orderby' => 'post__in'
) );
echo $before_widget;
if ( !empty( $title ) ) { echo $before_title . esc_html( $title ) . $after_title; } ?>
<p><?php echo esc_textarea( $text ); ?></p>
<div class="column clearfix">
<?php
while( $get_featured_pages->have_posts() ):$get_featured_pages->the_post();
$page_title = get_the_title();
?>
<div class="one-fourth">
<?php
if ( has_post_thumbnail( ) ) {
echo '<a title="'.get_the_title().'"href="'.get_permalink().'">'.get_the_post_thumbnail( $post->ID,'gallery').'</a>';
}
?>
<h3 class="custom-gallery-title"><a href="<?php the_permalink(); ?>" title=""><?php echo $page_title; ?></a></h3>
</div><!-- .one-fourth -->
<?php endwhile;
// Reset Post Data
wp_reset_query();
?>
</div><!-- .column -->
<?php echo $after_widget;
}
}
You need to edit here and custom code in your own way.
Regards
Sunil