Jump to content
Brian

Social Icons with BrandNav Section

Recommended Posts

Brian+    18
Brian

Hello, what's the code to display the social icons when the BrandNav section is activated? Thanks.

Share this post


Link to post
Share on other sites
catrina    103
catrina

You need to add URLs for the social icons to appear (they can be added to Settings > Header And Footer).


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Brian+    18
Brian

Hi Catrina, I did paste the URLs in the Settings > Header And Footer section. They show up if using the "Branding" section in the header but if I use the "BrandNav" section they don't show up.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

The social icons are not available in the Brandnav section "out of the box". The Brandnav is only logo and navigation inline.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Brian+    18
Brian

Is there simple code that I can put in the child functions.php file so this will work?

Share this post


Link to post
Share on other sites
catrina    103
catrina

To insert the icons in brandnav, you'll need to use a hook. Do you already have the Pagelines Customize plugin installed?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Brian+    18
Brian

I do. What will the code be for that hook?

Share this post


Link to post
Share on other sites
Brian+    18
Brian

I guess, whichever I need to paste in the Customize plugin for it to work.

Share this post


Link to post
Share on other sites
Brian+    18
Brian

RSS, Facebook, Twitter, and YouTube.

Share this post


Link to post
Share on other sites
catrina    103
catrina

The social icons are located in the pagelines/sections/branding directory. You'll need to create the code that goes into the hook, which should look like this (this code creates the linked icons):

   [/code]


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
mgwaters    1
mgwaters

Hi Catrina, can you please re-post the code (to create the linked icons) example from your December 19th post from above? I don't see the code example and I want to try and do the very thing you are describing. Thank you!

  • Like 1

Share this post


Link to post
Share on other sites
Rob    547
Rob

This is an old example of adding an icon via hook to the Branding area. Not BrandNav. Just Branding. The code below applies to PlatformPro. At the bottom is a list of hooks for Framework.


// HOOKS EXAMPLE --------//

// Below is an example of how you would add a social media icon to the icons in header (branding section)

// We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits

// getting thrown out during the upgrade process. The way to use hooks goes a little like this:


// add_action('hook_name','function name');


// ---> uncomment to load

//add_action('pagelines_branding_icons_end', 'add_icons_to_branding');

// function name

function add_icons_to_branding(){

  // This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css

  // and is the image from the CSS is placed in the images folder

  ?>

  <a href="http://www.stumbleupon.com/stumbler/pagelines/" class="stumbleupon"></a>

<?php }

// end function

This is the list of current hooks. http://api.pagelines.com/hooks/


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,


The link below is code that should be added to your child themes/customise plugin functions.php file.

 

http://paste.pagelines.com/7r6


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
benz_admin    0
benz_admin

Thanks Danny but there's something wrong on my step!

 

1- I installed Pagelines Customize plugin from the Store

2- Then I open Appearance > Editor and selected funtions.php file from the list at right.

3- On Appearance>Css I insert this code:

 

.custom {
    background: no-repeat scroll 50% 0 transparent;
}

 

4- I pasted this code into the file then I saved

 

    // ------- ADDS SOCIAL ICONS TO BRANDNAV ------- //
    add_action('pagelines_inside_bottom_brandnav', 'social_icons');    function social_icons(){ ?>
            <div class="icons" style="bottom: 12px; right: 1px;">
                <a target="_blank" href="#" class="custom"><img src="http://www.pianotopcucina.com/images/test.png" alt=""></a>
            </div>
        <script type="text/javascript">
            jQuery('.icons a').hover(function(){ jQuery(this).fadeTo('fast', 1); },function(){ jQuery(this).fadeTo('fast', 0.5);});
        </script>
    <?php }

 

But It doesn't work :-(

Share this post


Link to post
Share on other sites
Simon    247
Simon

benz_admin you dont have brandnav activated, you are using the standard navbar.

Apologies to the original poster for bumping an old thread.

Share this post


Link to post
Share on other sites
Simon    247
Simon

Please open a new topic, preferably in the customisations forum.

Apologies to the original poster for bumping an old thread.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×