Tagged: social media, translation
-
AuthorPosts
-
April 19, 2019 at 5:34 am #1092562
My site language is set to Norwegian. A week ago, the title “Share this entry” above the social media icons was translated automatically to Norwegian, but now it is displayed in English. I also wonder if I can get the social media icons to display after my custom field, which I added to like this
<?php the_field('svar_til_brukeren'); ?>
Here you can see where I have placed it currently in single-q_a.php:if(!$blog_disabled) { //show related posts based on tags if there are any get_template_part( 'includes/related-posts'); //wordpress function that loads the comments template "comments.php" comments_template(); } ?> <?php the_field('svar_til_brukeren'); ?> <!--end content--> </main> <?php $avia_config['currently_viewing'] = "blog"; //get the sidebar get_sidebar(); ?>
April 21, 2019 at 3:38 pm #1093049Hey guttogjente,
Sorry for the late reply, When your language stopped translating, was this after a update? Is the translation via WordPress or a translation plugin? We would need to see your site to see if it’s an error in the PO language file or something else.
But I’m sure we can change the text with jQuery and we can move it, but we will need to examine the page.Best regards,
MikeApril 23, 2019 at 4:50 am #1093505This reply has been marked as private.April 23, 2019 at 10:12 pm #1093755Hi,
Thanks for the login, to correct the “Share this entry” to “Del denne oppføringen” I hope this is correct.
I added this code to the end of your child theme functions.php file.function modify_share_title(){ return "Del denne oppføringen"; } add_filter('avia_social_share_title', 'modify_share_title');
As for your second question, I’m not sure were you want to move the social icons, at the very end of the page.
I’m not sure which is your “custom field”.Best regards,
MikeApril 24, 2019 at 3:09 pm #1094004Thanks, that worked well. Really appreciate your good help! I just changed the text to “Del dette innlegget”. I would like to have the social icons at the very end of the page, meaning after the last line “Vennlig hilsen Guttogjente.no” at the page https://www.guttogjente.no/sporsmal-og-svar/hjelp-med-identitet-og-relasjoner/ as an example. The custom field is the text that currently is displayed after the social media icons.
April 25, 2019 at 2:55 am #1094253Hi,
Try adding this code to the end of your functions.php file in Appearance > Editor:function custom_script(){ ?> <script> (function($){ $(document).ready(function(){ $( 'body' ).each(function() { $( this ).find( '.av-share-box' ).insertAfter( $(this).find('main.content') ); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_script');
Then try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:
.av-share-box { margin-bottom: 20px !important; }
Best regards,
MikeApril 25, 2019 at 3:58 am #1094274Thanks for your patient help! I first got a HTTP 500 error, but then I discovered that I had another function with the same name. Then I made it work when I changed the function name, but the social icons was hiding under the footer. I have decided to keep it as it was, since this modification also created an empty white space where the icons had been before. I keep the social sharing icons as a section separator. You can close this case.
April 25, 2019 at 4:05 am #1094275Hi,
Glad to hear this helped you decide not to change the layout, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Translation issue in social media heading in blog post’ is closed to new replies.