Jump to content


Photo
- - - - -

Social Icons not updating properly in Brandnav section

framework branding social icon

Best Answer Rob , 12 May 2013 - 03:48 PM

First thing is to activate the Action Map plugin and identify where you want to place the links.  I'm going to give you examples based on pagelines_branding_icons_start   but you may find an alternate location. 

 
add_action('pagelines_branding_icons_start', 'mynewicons');
function mynewicons(){
?>
<div class="mynewicons">
<div id="connect-br" class="sbconnecticon"><a href="YOUR URL TO BRAZILIAN LANGUAGE SITE"></a></div>
<div id="connect-en" class="sbconnecticon"><a href="YOUR URL TO ENGLISH LANGUAGE SITE"></a></div>
</div>
<?php }
// end function

The URLs you would place must be the full one, such as http://www.mysite.com and should not be written in the short form.

 

Edit this code to include the URLs, then, go to Dashboard > Plugins > Editor and select PageLines Customize from the drop down list and click "Select".

 

Once you see pagelines-customize/functions.php on the right side, click that.

 

Copy your edited code and paste it at the very end of the file, at the bottom.

 

I'll get to the CSS next.
 

Go to the full post


  • Please log in to reply
11 replies to this topic

#1 diretornak

diretornak

    Advanced Member

  • Members

  • 88 posts
  • LocationSao Paulo, Brasil
  • Framework Version:Always Latest
  • Country: Country Flag

Posted 12 May 2013 - 01:34 AM

Hey guys. I am having problems updating the social icon links in this website: www.essbrasil.com.br

 

For some reason, even though I have pointed both links to

Please Login or Register to see this Hidden Content

 using the "header and footer" site options, they are linking to whatever page is currently open. So if I click on any icon in the homepage, they will link to the homepage, and if I click on any icon in the "contato" page, they link to the "contato" page.

 

Any ideas on how I could fix this?

 

I am using latest versions on both Framework and Wordpress.



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 16289 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 12 May 2013 - 09:06 AM

Hi,

 

Not sure what you're trying to as your social icons seem to be overwritten with flag icons?

 

However, when entering a URL for your social media links, you must enter the full URL.

 

For example.

 

You shouldn't use something like this - example.com/twitter

 

It must be like this -

Please Login or Register to see this Hidden Content



#3 diretornak

diretornak

    Advanced Member

  • Members

  • 88 posts
  • LocationSao Paulo, Brasil
  • Framework Version:Always Latest
  • Country: Country Flag

Posted 12 May 2013 - 03:01 PM

Hey Danny, as I mentioned in my post, I used a full URL, it is simply not updating to the site.

 

Heres a screenshot to show that it is properly inserted:

 Untitled-1.jpg

 

Also, I dont see why me changing the images should have any influence in the way the links behave. I have no plugins other than pagelines sections and plugins and no cache or maintenance mode on.



#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 12 May 2013 - 03:07 PM

Hi,

 

I think you're mis-using the social icons in a way that will never work properly.

 

Instead of attempting this unsupportable method, I'd recommend you use a hook to implement your linked flag icons, and CSS to implement the images.

 

Are you familiar with hooks and CSS?



#5 diretornak

diretornak

    Advanced Member

  • Members

  • 88 posts
  • LocationSao Paulo, Brasil
  • Framework Version:Always Latest
  • Country: Country Flag

Posted 12 May 2013 - 03:10 PM

I am familiar with CSS, not with hooks.

 

But i still dont see why this should be "unsupported" or a misuse. I am using icons to link to urls, just like it was intended, I just replaced the images, like one would do to customize the social icons if they wanted to. Please explain how this will "never work properly" because this is making absolutely no sense.



#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 12 May 2013 - 03:23 PM

The social media section is designed to deal with specific links, which are identified in the data entry fields.  It is not designed to take just any link. Since it cannot validate the links you're putting in, it doesn't work. As you're trying to do something outside the design of PageLines' structure, it's unsupported.   The reason it won't work is that it's not designed to work in the way you're using it. I'm sorry about that, but there are better, easier ways than trying to force something to do a thing for which it's not designed.

 

I can help you however, with Hooks. Let's start with this:

Please Login or Register to see this Hidden Content

   You'll want the Action Map plugin, and PageLines Customize plugin, and optionally, you may want Hooker plugin. I believe the first two are free, and Hooker is free for Plus members.

 

I use hooks myself to implement customized social icons and links as you can see: 

Please Login or Register to see this Hidden Content

 

Let me know when you're ready and I'll be happy to help further.



#7 diretornak

diretornak

    Advanced Member

  • Members

  • 88 posts
  • LocationSao Paulo, Brasil
  • Framework Version:Always Latest
  • Country: Country Flag

Posted 12 May 2013 - 03:34 PM

Thanks for trying to explain, and lets try your method.

 

I have installed Action Map and Customize, and I have read the doc and understand the basics of how it works, but I have no knowledge of php.

 

What do I do now?



#8 diretornak

diretornak

    Advanced Member

  • Members

  • 88 posts
  • LocationSao Paulo, Brasil
  • Framework Version:Always Latest
  • Country: Country Flag

Posted 12 May 2013 - 03:46 PM

On a side note, another weird thing. If I drag the branding section above the brandnav, the icons work properly in the branding, but not in brandnav.



#9 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 12 May 2013 - 03:48 PM   Best Answer

First thing is to activate the Action Map plugin and identify where you want to place the links.  I'm going to give you examples based on pagelines_branding_icons_start   but you may find an alternate location. 

Please Login or Register to see this Hidden Content

The URLs you would place must be the full one, such as

Please Login or Register to see this Hidden Content

and should not be written in the short form.

 

Edit this code to include the URLs, then, go to Dashboard > Plugins > Editor and select PageLines Customize from the drop down list and click "Select".

 

Once you see pagelines-customize/functions.php on the right side, click that.

 

Copy your edited code and paste it at the very end of the file, at the bottom.

 

I'll get to the CSS next.
 



#10 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 12 May 2013 - 03:57 PM

The CSS for the Brazilian flag would be like this:

Please Login or Register to see this Hidden Content

As you can see from the CSS, the first element for connect-br is the base image (semi-transparent), and the second group is the hover action, showing the fully solid image.  Make sure to change the height and width to the size of the image in each instance.

 

You can copy this, change the URLs, and for English, copy again using connect-en.

 

This code would be placed in Dashboard > PageLines > Site Options > Custom Code.



#11 diretornak

diretornak

    Advanced Member

  • Members

  • 88 posts
  • LocationSao Paulo, Brasil
  • Framework Version:Always Latest
  • Country: Country Flag

Posted 12 May 2013 - 07:00 PM

Thanks man, that did it =D



#12 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 12 May 2013 - 07:04 PM

I knew it would!  Glad it worked.







Also tagged with one or more of these keywords: framework, branding, social icon