Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #922885

    Hi guys,
    I know this problem has already been treated in previously but I still need some support.
    I’m using the latest enfold version and I followed this: https://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/
    but when I created the header widget no matter wjat content I used it didn’t appear on the page (I checked the source and there was nothing there).
    I placed my script then on the google analytics code container in the enfold options. The script now work but it places the content at the bottom of the page, while I would like it to be just after the menu and before page content.

    Is the a way using either og the strategies to place the my script where I want it?
    (I’m not using a child theme, as I couldn’t complete the activation because after copying the child-theme folder in the themes folder I doesn’t becaome visible in the wordpress themes page….that’s another problem :|)

    Thank you for your help.
    Regards!
    Federico

    #922969

    Hey Federico,

    You can try using this construct:

    
    function addCustomScript(){
    ?>
    <script>
     // your code goes here
     
    </script>
    <?php
    }
    add_action('ava_after_main_menu', 'addCustomScript');
    

    This code should go into your child theme functions.php.
    Best regards,
    Victoria

    • This reply was modified 6 years, 3 months ago by Victoria.
    #923132

    Thank you Victoria. Can I place it on the enfold functions.php directly? (as I wrote I couldn’t activate the child theme)

    #923145

    I tried the code on the enfold functions.php but the content didn’t become visible on the site.

    #923415

    Hi,

    Please create a pastebin with the code you added so we can review.

    Best regards,
    Basilis

    #929440
    This reply has been marked as private.
    #930268

    Hi federicotriana,

    This part
    https://cl.ly/1C2N3b111C3e has to be on the page where you want to add the widget, not in this script.

    So put this the div where you need it and the rest in the functions.php and let us know how that worked for you.

    Best regards,
    Victoria

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.