Tagged: x
-
AuthorPosts
-
June 15, 2016 at 5:35 pm #1044074
RadModeratorHi there,
Would you mind providing your FTP login credentials as well? I like to directly test it 🙂
Thanks!
June 16, 2016 at 2:37 am #1044724
c1sParticipantThis reply has been marked as private.June 16, 2016 at 3:33 am #1044797
Rue NelModeratorHello There,
I have edited your excerpt more code and replace it with this line:
return ' ... ' . __( 'Weiterlesen', '__x__' ) . '';It turns out that the Panama skin itself has it’s own filter which has created the issue. Could please choose another skin to test this out?
Please let us know how it goes.
June 16, 2016 at 4:23 am #1044874
c1sParticipantHi there,
thanks. Is is possible to keep the Panama skin like it is?
In the moment the excerpts already show the “Read on”, but only as text. Is it possible to make a hyperlink so the “Read on” links into the blog entries? Then everything would be perfect.
Thanks again!!
June 16, 2016 at 7:40 am #1045080
LelyModeratorHi There,
Unfortunately, I can’t login via FTP again to check your current excerpt readmore code. I am getting the following error:
Connection timed out after 20 seconds of inactivity Error: Could not connect to serverIf this line of code add that the read more text from your functions on the child theme:
return ' ... ' . __( 'Weiterlesen', '__x__' ) . '';You can update that to this like the previous suggested
return ' ... <a href="' . get_permalink() . '">' . __( 'Weiterlesen', '__x__' ) . '</a>';
We just wrap it inside the link tag.Hope this helps.
June 16, 2016 at 1:20 pm #1045626
c1sParticipantHi!
Thanks, i did that now, but it still doesn’t the “Read on” in the latest blog entry. Does your access to the FTP work?
June 16, 2016 at 6:23 pm #1046081
RadModeratorHi there,
FTP isn’t working on my end, though, I disabled the code through admin but no change. That means it’s nothing to do with that code. Could be something else.
Please provide a procedure on how we could get it with your FTP.
Thanks!
June 20, 2016 at 6:27 am #1050411
c1sParticipantHi,
i think it is a bug in The Grid.
Therefore I have switched to the “conventional” recent posts shortcode, which is also nice. The only drawback is, that there is no excerpt possible or built in. I have repeatedly made the experience that those “native” solutions to the theme generally work better than the plugins offered.
Thanks for your help.
June 20, 2016 at 10:58 am #1050897
LelyModeratorHi There,
You’re welcome!
Please add the following code on your child theme’s functions.php file to add excerpt to recent post element.// Recent Posts with Excerpt // ============================================================================= function x_shortcode_recent_posts_with_excerpt( $atts ) { extract( shortcode_atts( array( 'id' => '', 'class' => '', 'style' => '', 'type' => 'post', 'count' => '', 'category' => '', 'offset' => '', 'orientation' => '', 'show_excerpt' => 'true', 'no_sticky' => '', 'no_image' => '', 'fade' => '' ), $atts, 'x_recent_posts' ) ); $allowed_post_types = apply_filters( 'cs_recent_posts_post_types', array( 'post' => 'post' ) ); $type = ( isset( $allowed_post_types[$type] ) ) ? $allowed_post_types[$type] : 'post'; $id = ( $id != '' ) ? 'id="' . esc_attr( $id ) . '"' : ''; $class = ( $class != '' ) ? 'x-recent-posts cf ' . esc_attr( $class ) : 'x-recent-posts cf'; $style = ( $style != '' ) ? 'style="' . $style . '"' : ''; $count = ( $count != '' ) ? $count : 3; $category = ( $category != '' ) ? $category : ''; $category_type = ( $type == 'post' ) ? 'category_name' : 'portfolio-category'; $offset = ( $offset != '' ) ? $offset : 0; $orientation = ( $orientation != '' ) ? ' ' . $orientation : ' horizontal'; $show_excerpt = ( $show_excerpt == 'true' ); $no_sticky = ( $no_sticky == 'true' ); $no_image = ( $no_image == 'true' ) ? $no_image : ''; $fade = ( $fade == 'true' ) ? $fade : 'false'; $js_params = array( 'fade' => ( $fade == 'true' ) ); $data = cs_generate_data_attributes( 'recent_posts', $js_params ); $output = "<div {$id} class=\"{$class}{$orientation}\" {$style} {$data} data-fade=\"{$fade}\" >"; $q = new WP_Query( array( 'orderby' => 'date', 'post_type' => "{$type}", 'posts_per_page' => "{$count}", 'offset' => "{$offset}", "{$category_type}" => "{$category}", 'ignore_sticky_posts' => $no_sticky ) ); if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post(); if ( $no_image == 'true' ) { $image_output = ''; $image_output_class = 'no-image'; } else { $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'entry-full' ); $bg_image = ( $image[0] != '' ) ? ' style="background-image: url(' . $image[0] . ');"' : ''; $image_output = '<div class="x-recent-posts-img"' . $bg_image . '></div>'; $image_output_class = 'with-image'; } $excerpt = ( $show_excerpt ) ? '<div class="x-recent-posts-excerpt"><p>' . preg_replace('/<a.*?more-link.*?<\/a>/', '', cs_get_raw_excerpt() ) . '</p></div>' : ''; $output .= '<a class="x-recent-post' . $count . ' ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', 'cornerstone' ), the_title_attribute( 'echo=0' ) ) ) . '">' . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">' . '<div class="entry-wrap">' . $image_output . '<div class="x-recent-posts-content">' . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>' . '<span class="x-recent-posts-date">' . get_the_date() . '</span>' . $excerpt . '</div>' . '</div>' . '</article>' . '</a>'; endwhile; endif; wp_reset_postdata(); $output .= '</div>'; return $output; } add_action('wp_head', 'change_recent_posts_to_v2'); function change_recent_posts_to_v2() { remove_shortcode( 'x_recent_posts' ); add_shortcode( 'x_recent_posts', 'x_shortcode_recent_posts_with_excerpt' ); }Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1037325 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
