Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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();
    
    				?>
    #1093049

    Hey 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,
    Mike

    #1093505
    This reply has been marked as private.
    #1093755

    Hi,
    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,
    Mike

    #1094004

    Thanks, 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.

    #1094253

    Hi,
    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,
    Mike

    #1094274

    Thanks 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.

    #1094275

    Hi,
    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Translation issue in social media heading in blog post’ is closed to new replies.