Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1056200

    I managed to adjust the header to add a widget and put the number in the header using this thread, but there are issues remaining and I need help.

    The main thing about a law firm website is the number should be really big and should be in the main header, but in the theme Enfold puts the number in the Small Menu Bar Above the header.

    No matter, I managed to move the phone number to the header by creating a widget but in the process two things happened: (1) the Logo automatically got smaller; (2) the Phone Number cannot be made Larger. I need to be able to make the phone number bigger and the logo bigger but it seems its stuck and I dont know where in the code I would do this. I am assuming I would have to make the widget larger? No idea, need help.

    I wish enfold would release a lawyer theme where the header is more customizable without coding knowledge. Lawyers need huge phone numbers in their Headers and None of the Enfold themes really have that option

    Ideally, id like to be able to do something like this for the header. I wish enfold : https://www.dolmanlaw.com/

    Right now, what I have is this: https://foreclosurelawyersfl.com

    #1056311

    First of all – enfold got a very nice Documentation Page:
    just search f.e.: https://kriesi.at/documentation/enfold/?s=header&numberposts=5&results_hide_fields=

    you will find a lot of code to get custom header styling.

    Then what hook to you used for making the header widget area?

    #1056323

    f.e. you can place it on top – between header and meta header – see here : https://webers-testseite.de/ostler/

    btw: what have you done with your menu? it breaks into a second line ( see areas )

    #1056338

    my advice for you would be to have header: logo left – menu right – social media on top bar.
    Maybe – if you got a lot of menu points a – Multiline menu
    see link above – reduce the size of the screen to see what happens.

    #1056351

    Thank you for the suggestion.

    I moved the social media icons to top bar. https://foreclosurelawyersfl.com.

    But since I am an Uber Noobie I have no idea what im doing and was hoping for a step by step on how to make the Number Widget I added to the main header bigger and add a phone icon.

    #1056355

    lets see what happens if you take a different hook for the header widget area:
    on helper-main-menu.php there are hooks to have for that custom input.
    there are different hooks in that file: one is “header_main” in the code there will be the line: do_action('ava_main_header');
    there are f.e.: ava_main_header, ava_main_header_sidebar, ava_before_bottom_main_menu, ava_inside_main_menu, ava_after_main_menu
    These are all on different places in the DOM
    Now everything depends on where you hook in :lol

    on my test page i take this code to functions.php of my child-theme:

    add_action( 'ava_main_header', 'header_top_widget_area' );
    function header_top_widget_area() {
      dynamic_sidebar( 'header-top' );
    }

    It will hook into ava_main_header and you only have to make a custom widget area called : header-top
    ( The naming is arbitrary, only has to be synchronized with the dynamic sidebar we registered on functions.php. )

    Put in the newly made widget area you prefer – i take for it the textwidget.
    Leave heading open and put in your phonenumber. on my test it is in text mode:
    <h1>Phone: <a href="tel:+492289768293">+49 228 9768293</a></h1>

    Put this to quick css:

    #header_main .widget {
        padding: 10px 0 0;
    }
    #header_main .widget .textwidget {
        text-align: center;
    }

    By the way – get rid of the other hook you placed in functions.php to get your header widget area.
    After that we will see what happens to your menu.

    And maybe it will be better to take a h2 for it – because it is no good praxis to have more than one h1 each page.

    #1056356

    you got some custom css code for header widgets ( in custom.css ) – maybe you erase them – because i fear the will missmatch for that.

    /* Widgets */
    .responsive #top #header #header_main .inner-container .widget {
        order: 0;
        /*! flex-basis: 100%; */
        padding: unset;
        clear: none!important;
        align-self: center;
        align-items: center;
        z-index: 1;
    }
    
    .responsive #top #header #header_main .inner-container .widget>div {
        width:100%;
        line-height: 180px;
        padding:1 10px;
    }
    #1056416

    Hi,

    Thanks for helping out @guenni007, much appreciated. Did you have any luck with that @dweisseland?

    Best regards,
    Rikard

    #1056485

    Is the yellowish background color for header meta wanted?

    #header_meta {
        background-color: #fff !important;
    }

    Have you troubles to follow the instructions for new header widget area?

    on my test page i take this code to functions.php of child-theme:

    add_action( 'ava_main_header', 'header_top_widget_area' );
    function header_top_widget_area() {
      dynamic_sidebar( 'header-top' );
    }
    • after that goto widgets and fill in : “Enfold Child Custom Widget Area” header-top and click “add widget area”
    • Put in that newly crated Widget Area a Textwidget.
    • Do not set a Heading for it – leave visual editor and click on text editor of that widget.
    • Enter in the text input field:
    
    <h2>Phone: <a href="tel:+555334759213">+555 334 759 213</a></h2>

    Now we go and style the new widget:

    #header_main .widget {
        padding: 10px 0 0;
    }
    #header_main .widget .textwidget {
        text-align: center;
    }
    #1056491

    i see that you are not working with a child theme – Every changings on functions.php of parent theme will be lost on next update.

    Therefore, I generally always advise to use a child theme.
    you can see here on that very good documentation page of enfold how to install :
    https://kriesi.at/documentation/enfold/child-theme/
    After uploading the child-theme folder with its files – and activation of the child – Enfold got some tools to import parent theme settings.

    you have here a good instruction to enter code snippets to functions.php:
    https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/

    PS: The note on that instruction page is very well:
    NOTE: Each function should have a unique name.

    because sometimes mods here on board do alway use ava_custom_script() for their tips. But if a function has no unique name you will have ( on former wordpress versions a white screen of death ) error alert. Often it is just on that reason.

    See here some info about header-widget areas:
    https://kriesi.at/documentation/enfold/header/#customization

    #1056548

    Hi,

    Thanks again for helping out @guenni007, it’s appreciated as always :-)

    Best regards,
    Rikard

    #1056859

    Guenni,

    Thank you for the help but I have a hard time folowing.

    I installed the child theme. I want my header to look almost exactly this using Enfold: https://www.larryhparker.com/

    Please help me with the steps.

    #1057213

    One request before I start figuring out the code for you right now. Could you be clear with yourself how the header should look like?
    Yesterday it was not a shrinking header today already.
    Without the shrinking it would be much easier – because the hight of the widget has influence on that shrinking code.

    On your desired header look like – there is a

    • non shrinking header
    • logo left
    • menu right – but under Logo
    • header-meta with some info ( social media etc)
    • Phonenumber plus button besides the logo on the right

    So look to this if it fits your needs: https://webers-testseite.de/ostler/

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