Tagged: x
-
AuthorPosts
-
March 6, 2017 at 6:29 am #1396115
Paul RModeratorHi,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
March 6, 2017 at 11:21 am #1396513
ili333ParticipantThis reply has been marked as private.March 7, 2017 at 10:21 am #1397884
LelyModeratorHi There,
Thank you for the screenshot.
See attached screenshot of what I am seeing right now. The code is working as expected. Adding the Weiterlesen square button at the end of the excerpt. The only thing that I found weird is the Read text at the end of the excerpt. You don’t have plugins that might cause this. There’s also no code on your functions.php that will add this text. I tried to login to your site hosting using FTP but my connection was refused by your server. Did you in any case, edited the main X theme files?March 7, 2017 at 10:34 am #1397904
ili333ParticipantNot that I know, never edited the main x theme files.
March 7, 2017 at 10:39 am #1397915
ili333ParticipantI also feel strange about that short “read” text inside the box.
March 7, 2017 at 12:33 pm #1398093
ili333ParticipantAnd now I´m facing with a problem without knowing how it came to that. Please have a look at my homepage under following URL http://veritasblog.de/artikel/
You will see, that the pencil icon, calendar icon etc. looks very strange. Instead there are some unknown icons/signs. Anyone know how to fix this ?March 7, 2017 at 1:38 pm #1398163
Nabeel AModeratorHi again,
Please add the following code in your child theme’s style.css file:
.x-icon-pencil:before { content: '\f040' !important; } .x-icon-calendar:before { content: '\f073' !important; } .x-icon-bookmark:before { content: '\f02e' !important; color: #7e7c7c; } .x-icon-comments:before { content: '\f075' !important; color: #7e7c7c; }Let us know how this goes!
March 8, 2017 at 7:30 am #1399025
ili333ParticipantThank you works fine, I added this code inside the Custom CSS. In child themes css this code doesn´t work.
Now only the recent posts issue is left.March 8, 2017 at 8:44 am #1399095
LelyModeratorHi There,
Just to make sure, can you try disabling all plugins except cornerstone and then switch to main X theme? If your hosting has caching service, try clearing cache before checking again. This is just narrow down where that Read text is coming from.
March 8, 2017 at 3:57 pm #1399696
ili333ParticipantHi, did it like you suggested, but that didn´t work
March 8, 2017 at 10:24 pm #1400085
RadModeratorHi there,
Before we continue, because there are seems a confusion of what’s need to implemented.
The changes you wish to implement is both for Home’s recent post element and Blog’s recent posts.
Hence, you’re not going to remove any code, please re-add this code as this is for blog’s recent posts.
if ( ! function_exists( 'x_excerpt_string' ) ) : function x_excerpt_string( $more ) { $stack = x_get_stack(); if ( $stack == 'integrity' ) { return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>'; } else if ( $stack == 'renew' ) { return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>'; } else if ( $stack == 'icon' ) { return ' ...'; } else if ( $stack == 'ethos' ) { return ' ...'; } } add_filter( 'excerpt_more', 'x_excerpt_string' ); endif;And this one is for home’s recent post element.
// ============================================================================= // Custom Excerpt Length - Call: echo excerpt($length); // ============================================================================= function limited_excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'.'; } else { $excerpt = implode(" ",$excerpt); } // $excerpt = preg_replace('<code>\[[^\]]*\]</code>','',$excerpt); return $excerpt; } // ============================================================================= // Add Excerpt to Recent Posts // ============================================================================= function x_shortcode_recent_posts_v2code( $atts ) { extract( shortcode_atts( array( 'id' => '', 'class' => '', 'style' => '', 'type' => 'post', 'count' => '', 'category' => '', 'enable_excerpt' => 'true', 'offset' => '', 'orientation' => '', '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'; $no_image = ( $no_image == 'true' ) ? $no_image : ''; $fade = ( $fade == 'true' ) ? $fade : 'false'; $enable_excerpt = ( $enable_excerpt == 'true' ) ? true : 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}" ) ); if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post(); $content_excerpt = get_the_excerpt(); $post_author = get_the_author(); if ( $no_image == 'true' ) { $image_output = ''; $image_output_class = 'no-image'; } else { $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'entry-cropped' ); $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'; } $output .= '<a class="x-recent-post' . $count . ' ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', csl18n() ), 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">by ' . $post_author.' | ' . get_the_date() . '</span>' . ( $enable_excerpt ? '<span class="x-recent-posts-excerpt">' . strip_tags(limited_excerpt(35)) . '</span> <span class="x-btn x-btn-square x-btn-mini">read more</span>' : '' ) . '</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_v2code' ); } // ============================================================================= // =============================================================================All you need to do is edit this line,
function x_excerpt_string( $more ) {and change it into this
function x_excerpt_string( $more ) { if ( !is_home() ) return "";To make sure that there is no “Read” text on home’s recent post element.
Thanks.
March 9, 2017 at 3:45 am #1400312
ili333ParticipantAbsolutely genius! It works fine. Great support by the way!
March 9, 2017 at 4:41 am #1400372
Paul RModeratorThank you for your kind words. Have a nice day!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1390826 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
