Tagged: x
-
AuthorPosts
-
November 29, 2016 at 10:32 pm #1275563
kopaysages-gdParticipanthttp://www.kopaysages.com/
WordPress 4.6.1
X – Child Theme
X – Integrity Version : 4.6.4
CodeStyling Localization Version 1.99.30Hi!
With CodeStyling Localization I translated Permalink to:
to Permalien vers : (fr_CA)It’s O.K. on all pages (ex.: http://www.kopaysages.com/portfolio/projets/ ) but not on home page
as alt text (hover) on the 9 images under Projets, Thèmes and Blogue.Thanks for your help!
Gilles
November 30, 2016 at 12:04 am #1275606
RupokMemberDecember 12, 2016 at 5:55 pm #1290589
kopaysages-gdParticipantHi!
Read that, done that 😉
and still the same problemhttp://www.kopaysages.com/
WordPress 4.7
X – Child Theme
X – Integrity Version : 4.6.4
CodeStyling Localization Version 1.99.30December 13, 2016 at 12:34 am #1290875
ChristopherModeratorHi there,
Please add following code in child theme’s functions.php file :
// ============================================================================= function x_shortcode_recent_posts_v2code( $atts ) { extract( shortcode_atts( array( 'id' => '', 'class' => '', 'style' => '', 'type' => '', 'count' => '', 'category' => '', 'enable_excerpt' => '', 'offset' => '', 'orientation' => '', 'no_image' => '', 'fade' => '' ), $atts ) ); $id = ( $id != '' ) ? 'id="' . esc_attr( $id ) . '"' : ''; $class = ( $class != '' ) ? 'x-recent-posts cf ' . esc_attr( $class ) : 'x-recent-posts cf'; $style = ( $style != '' ) ? 'style="' . $style . '"' : ''; $type = ( $type == 'portfolio' ) ? 'x-portfolio' : 'post'; $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; $output = "<div {$id} class=\"{$class}{$orientation}\" {$style} 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(); if ( $no_image == 'true' ) { $image_output = ''; $image_output_class = 'no-image'; } else { $image_output = '<div class="x-recent-posts-img">' . get_the_post_thumbnail( get_the_ID(), 'entry-' . get_theme_mod( 'x_stack' ) . '-cropped', NULL ) . '</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( __( 'Permalien vers: "%s"', '__x__' ), 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>' // . ( $enable_excerpt ? '<span class="x-recent-posts-excerpt">' . strip_tags( get_the_excerpt() ) . '</span>' : '' ) //.'<div>' . __( 'Read More', '__x__' ) .'</div>' . '</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' ); }Hope it helps.
December 14, 2016 at 2:55 am #1292418
kopaysages-gdParticipantHelp!
Added the code and now BLANK pages
on admin side AND on the site sideDecember 14, 2016 at 3:06 am #1292431
ChristopherModeratorHi there,
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.
Thanks.
December 14, 2016 at 3:15 am #1292441
kopaysages-gdParticipantThis reply has been marked as private.December 14, 2016 at 3:53 am #1292469
ChristopherModeratorHi there,
Upon checking your host files, you added part of code in functions.php file, I fixed it for you. Please clear cache and check again.
Hope it helps.
December 14, 2016 at 4:11 am #1292484
kopaysages-gdParticipantHi again!
Thank you very much for that.
Admin and site are up.But we still have the same translation problem on home page 🙁
December 14, 2016 at 5:03 am #1292529
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> Global JavaScript :
jQuery('.entry-thumb').each(function(e){ var title = jQuery(this).attr('title'); jQuery(this).hover(function() { jQuery(this).attr('title', title.replace('Permalink to: ', 'Permalien vers: ')); }); });Hope that helps.
December 14, 2016 at 10:27 pm #1293779
kopaysages-gdParticipantHi Christopher!
Done that and…
it’s not workingDecember 14, 2016 at 11:54 pm #1293842
Rue NelModeratorHello There,
Sorry if it didn’t work out. Since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
// Change Permalent To // ============================================================================= function change_permalink_to($translated) { $translated = str_ireplace('Permalink to: ', 'Permalien vers: ', $translated); return $translated; } add_filter('gettext', 'change_permalink_to' ); // =============================================================================Hope this helps. Kindly let us know.
December 15, 2016 at 8:29 pm #1295165
kopaysages-gdParticipantYESSS!
It’s working. THANK YOU!I inserted your code under Christopher’s code first response
(#1290875). Is this O.K.? Do I have to cut Christopher’s code?On other pages, I have Permalien vers : « —– »
on home page, I have Permalien vers : “—–”
Is there a way to replace “—–” by « —– » ?Thank you very much for your help with this.
December 15, 2016 at 9:27 pm #1295212
Rue NelModeratorHello There,
Thanks for updating us in! Glad it works out for you. You can update the code to replace the arrows. maybe you can make use of this code instead:
// Change Permalent To // ============================================================================= function change_permalink_to($translated) { $translated = str_ireplace('Permalink to: "%s"', 'Permalien vers: "%s"', $translated); return $translated; } add_filter('gettext', 'change_permalink_to' ); // =============================================================================Hope this helps.
December 16, 2016 at 4:05 pm #1296043
kopaysages-gdParticipantHi!
You understood me wrong. My wish was to replace ” ” by « ».
But I update the code like this and it worked.// =============================================================================
function change_permalink_to($translated) {
$translated = str_ireplace(‘Permalink to: “%s”‘, ‘Permalien vers : « %s »‘, $translated);
return $translated;
}
add_filter(‘gettext’, ‘change_permalink_to’ );
// =============================================================================Thanks a lot for your precious help!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1275563 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
