Tagged: four columns
- This topic has 4 replies, 2 voices, and was last updated 10 years, 7 months ago by Theme Horse Support Team.
-
AuthorPosts
-
April 27, 2014 at 3:27 pm #9768DanielParticipant
I want to show the excerpt in Recent Work widget (as a similar way that Services widget).
Could you help me with CSS or code to put in a Child Theme?Thank for your excelent support
Regards, Daniel
April 28, 2014 at 1:49 pm #9800Theme Horse Support TeamKeymasterhi DD
You need code customization for it but while doing this updating to the new version you customization code will be lost.
Its better to add the content as you like on the feature recent widgets and give a link to a specific page to display the full content.
Regards
SunilApril 28, 2014 at 3:23 pm #9802DanielParticipantThanks Sunil, Could you explain little more your recommendation of “add the content as you like on the feature recent widgets”?
The final work may be look as follows:
If you want to help me with some code don’t worry about new version because I have a Child Theme.
Thanks a lot.
April 29, 2014 at 11:49 am #9827DanielParticipantDear Sunil, I hope you can help me, it is very important for me to achieve this with Attitude Theme.
Thanks !
May 1, 2014 at 3:03 am #9887Theme Horse Support TeamKeymasterHi DD
you can change the code from attitude->library->widgets->attitude_widget.phpOn 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 -
AuthorPosts
- You must be logged in to reply to this topic.