Archived

This topic is now archived and is closed to further replies.

  • 0

Social Icons with BrandNav Section

Question

Posted · Report post

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

22 answers to this question

Posted · Report post

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/

Share this post


Link to post
Share on other sites

Posted · Report post

Hi to all,

I'd like to customize the icon on brandnav by adding some custom icons  (like blog)

I just read this topic but i don't know how hooks work.

Is there a tutorial o someone can explain it to me??

 

the result should be something like this http://golfclub-stippelberg.nl/

 

thanks

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,


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

 

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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]

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

Sorry :unsure:

 

I confused BrandNav for Branding....

I know that I'm off-topic but can you link me here the code to adding the custom icons in the branding area or have I to open a new topic??

 

Thanks and sorry all again!

 

http://www.pianotopcucina.com

Share this post


Link to post
Share on other sites

Posted · Report post

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

Posted · Report post

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

Posted · Report post

Are you using the PageLines Framework or PlatformPro with PlatformBase?

Share this post


Link to post
Share on other sites

Posted · Report post

Pagelines Framework.

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Catrina. That works.

Share this post


Link to post
Share on other sites

Posted · Report post

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!

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

The hook itself or the code that generates the buttons?

Share this post


Link to post
Share on other sites

Posted · Report post

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

Posted · Report post

The hook you need is: brandnav_after_nav (More hooks are available here: http://api.pagelines.com/hooks) Which social icons do you want to display?

Share this post


Link to post
Share on other sites

Posted · Report post

RSS, Facebook, Twitter, and YouTube.

Share this post


Link to post
Share on other sites