Okay
  Public Ticket #2854799
Reorder social icons in header
Closed

Comments

  •  23
    alberteck started the conversation

    Hey

    How can I reorder the social icons in the header (and the sliding menu for mobile)

    Thanks!

  •  1,882
    Judith replied

    Hi There,

    Please send in your website url and also the order you would want so that we can provide css for it.

    Thanks.

  •   alberteck replied privately
  •  23
    alberteck replied

    Sent it privately

  •  1,882
    Judith replied

    Hi Alberteck,

    Please let us know how you would want to reorder the social icons, which positions would you want the icons to change to.

    Thanks.

  •  23
    alberteck replied

    Instagram
    Tiktok
    Snapchat
    Facebook
    Twitter
    YouTube
    LinkedIn

  •  1,882
    Judith replied

    Hi Alberteck,

    Please try this css:

    body.material #header-outer #social-in-menu i {
      display: flex;
      flex-direction: row;
    }
    #header-outer #social-in-menu a:nth-of-type(1) {
        order: 3;
    }
    #header-outer #social-in-menu a:nth-of-type(2) {
        order: 2;
    }
    #header-outer #social-in-menu a:nth-of-type(3) {
        order: 4;
    }
    #header-outer #social-in-menu a:nth-of-type(4) {
        order: 3;
    }
    #header-outer #social-in-menu a:nth-of-type(5) {
        order: 0;
    }
    #header-outer #social-in-menu a:nth-of-type(6) {
        order: 1;
    }
    #header-outer #social-in-menu a:nth-of-type(7) {
        order: 0;
    }

    Thanks

  •  23
    alberteck replied

    Hi!

    Thanks! It worked for desktop. But the order on mobile remained unchanged..

  •  1,882
    Judith replied

    Hi Alberteck,

    You may need to remove the css and reorder the icons from header.php located under  salient/nectar/helpers/ as shown below:

    6856175454.png

    Thanks.

  •  23
    alberteck replied

    Can you send the CSS for changing the order of the social icons in the footer?

  •  8,860
    Tahir replied

    Hey Again,

    As Judith mentioned this would be much easier if you adjusted the PHP functions via a Child theme found in "salient/nectar/helpers/" as the CSS would change if you were to add or remove an icon in the future.

    Thanks


    ThemeNectar Support Team 

  •  23
    alberteck replied

    Hey

    I have created a childtheme, and tried enqueuing the edits, but unable to get it to work. I could find 2 functions related to the order of social icons, and made the changes in 3 places (Tried placing Instagram before everything else), but the changes weren't reflected in the website.

    I have attached the child-theme in a zip to this thread, could you please tell me where exactly do I have to make the changes? And if my child theme configuration is correct for Salient..

    Thanks!

  •  1,882
    Judith replied

    Hi There,

    You make the changes from header.php located under nectar/helpers, you rearrange as you would wish from here by moving the statements of code representing the social icons:

    8641703764.png

    Thanks.

  •  23
    alberteck replied

    Hi Judith! Hope you are well.

    As you can see, I have placed Instagram before Facebook. (this file is live on the site)

    Yet, the order on the website remains unchanged (Facebook before Instagram), even though I have changed the order in this file...

  •  1,882
    Judith replied

    Hi Alberteck,

    Is it possible you could allow me login into your website and check this out

  •   alberteck replied privately
  •  1,882
    Judith replied

    Hi Alberteck,

    Seems your password is not working, please check and resend:

    5997774922.png

    Thanks.

  •   alberteck replied privately
  •  1,882
    Judith replied

    Please check it out.

  •  23
    alberteck replied

    Thanks! 

    For anyone else who might need this: The modification Judith made (shown the in the screenshot) would only change the order in the header and the footer. For the off-canvas menu, the order has to be changed in the function just below that.

    Also, since the child theme wasn't working properly for some reason, I used "Code Snippets" to overwrite those two specific functions alone.

  •  1,882
    Judith replied

    Hi Alberteck,

    This is great work and thank you for the additional information.

    Thanks.