Please add ability to add an excerpt.
-
Please add ability to add an excerpt… you can easily improve what I added as follows:
clink/inc/cpt.php
'supports' => array( 'title', 'author', 'revisions', 'excerpt' ), // excerpt added
clink/inc/functions.php
while( $clink_widget_query->have_posts() ) : $clink_widget_query->the_post(); $clink_link_title = get_the_title(); $clink_link_url = get_the_permalink(); $excerpt_text = htmlentities(get_the_excerpt()); // added if( $arg['show_clicks'] == 1 ){ $clink_clicks = clink_clicks( get_the_ID() , true ); $clink_clicks = '<span class="clink-clicks"> ' . $clink_clicks . ' </span>'; } // replaced with following line //$Cl_qu_str .= '<li class="clink-' . get_the_ID() . '"><a href="' . $clink_link_url . '">' . $clink_link_title . $clink_clicks . '</a></li>'; $Cl_qu_str .= '<li class="clink-link clink-' . get_the_ID() . '"><a href="' . $clink_link_url . '" target="_blank">' . $clink_link_title . $clink_clicks . '<div class="excerpt-text">'.$excerpt_text.'</div></a></li>';
style.css
.clink-link a { color: #009900 !important; font-size: 125%; line-height: 125%; } .clink-link a:hover { color: #990000 !important; } .excerpt-text { color: #5c5c5c !important; font-size: 75%; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Please add ability to add an excerpt.’ is closed to new replies.