• Hey there! I’d like to add another line of info to the header in the contact info area. What file should I edit to accomplish this?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Hi @rick0316,

    You may use JavaScript to add new element to contact area without doing any modification to the theme’s files.

    Add this snippet to your child theme’s function or use a plugin that allows you to add a new function like code snippet:

    function my_custom_script_to_footer() {
    ?>
    <script type="text/javascript">
    jQuery(function($) {
    var headerContact = $('.header-elements .header-contact');

    var newLine = '<div class="my-new-element">'+
    '<span><a href="#">New element goes here</a></span>'+
    '</div>';

    if ( headerContact.length ) {
    headerContact.append(newLine);
    }
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'my_custom_script_to_footer');

    Hope this reply helps.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.