Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'gfpc_entry_header', 'lb_do_custom_post_title', 8, 2 );
- function lb_do_custom_post_title( $instance, $widget_id ) {
- $a_wrap_open = $a_wrap_close ='';
- // if($instance['title_link'] == 'permalink') {
- // $link = ( get_post_meta( get_the_ID(), 'other_permalink', true ) ) ? get_post_meta( get_the_ID(), 'other_permalink', true ) : get_permalink();
- // $a_wrap_open = sprintf('<a href="%s" title="%s">', $link, the_title_attribute( 'echo=0' ) );
- // $a_wrap_close = '</a>';
- // }
- $custom_page_title = ( get_post_meta( get_the_ID(), 'title_for_homepage_boxes', true ) ) ? get_post_meta( get_the_ID(), 'title_for_homepage_boxes', true ) : get_the_title();
- if ( !empty( $instance['show_title'] ) && !empty( $instance['title_limit'] ) )
- $title = sprintf( '<h2 class="entry-title">%s%s%s%s</h2>', $a_wrap_open, genesis_truncate_phrase( $custom_page_title, $instance['title_limit'] ), $instance['title_cutoff'], $a_wrap_close );
- elseif ( !empty( $instance['show_title'] ) )
- $title = sprintf( '<h2 class="entry-title">%s%s%s</h2>', $a_wrap_open, $custom_page_title, $a_wrap_close );
- echo apply_filters( 'gfpc_do_post_title_'. $widget_id, $title, $instance);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement