Jump to content
Sign in to follow this  
stefanoferruggiara

facebook like box in header

Recommended Posts

stefanoferruggiara

Ciao to everybody, from Italy! I have this problem.. I would like to insert this code: <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/StefanoFerruggiaraAllenatoreMentale" width="600" show_faces="false" border_color="#336699" stream="false" header="false"></fb:like-box> in the header, from the right side just up to the social icon Someone can say to me how? You have some custom code that i can insert? Thanks!!! Take care! A big ciao for the mitic Adam!


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
ducksunlimitedcanada

Sorry on second thought, not what you wanted. I was having issues with this a few days ago and found a option...cant find it in the forums now!! hunting...It was about getting the universal sidebar to actually show up in the head, then you can easily drop the code in the widget.

Share this post


Link to post
Share on other sites
kastelic

You could use a hook to insert your code: http://www.pagelines.com/docs/base-child-theme Would look something like (paste in functions.php of the base child theme):

add_action('pagelines_before_branding_icons','add_facebook');
	function add_facebook(){
	?>
	   ///Your facebook code
	<?php
	}

Share this post


Link to post
Share on other sites
stefanoferruggiara

I try and nothing happen... is this the complete code that i have to enter??? Would you please write me ALL the code and not only a part.. i post the code up ... add_action('pagelines_before_branding_icons','add_facebook'); function add_facebook(){ ?> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/StefanoFerruggiaraAllenatoreMentale" width="600" show_faces="false" border_color="#336699" stream="false" header="false"></fb:like-box> <?php }


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
kastelic

Just tried it on my site and it worked. It is the entire code you need to paste. Do you have the base child theme activated and the code is in base/functions.php? Do you have the social icons on your page (the hook wont be there if you don't)? Link to site?

Share this post


Link to post
Share on other sites
stefanoferruggiara

Is thisMY SITE Is it possible that i do something not correct.. for insert the code I have to go in Theme -> Editor -> Platform Base -> Function.php and paste it, right or wrong?


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
catrina

You need to add it below where it says the hooks should be added (below where the example hook and its instructions are).


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
stefanoferruggiara

sorry but im not technical... hello!!! someone know the neuro linguistic programming and what does it mean LISTEN TO SOMEONE??? I say.. IM NOT TECHNICAL does it mean that i do know where i have to insert what and how.. im italian than all the video that exmplai is difficul to understand.. than.. i write the code that work correctly in widget text.. i ask if someone can write the COMPLETE CODE (custum + mine) and not a part of it... if you write PUT YOUR CODE THERE /// i have to take of this /// or not? in which part of the setting i have to entre the code??? in custom? in function.php? for entre in function.php.. which platform: base or pro? at the top o the end? Now you understand how its difficult to me??? I ask for custom code cause i now where is in theme setting.. no more.. i write my code than i so diffucult to rewrite a code with included mine for let me understand better??? Came on!


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
catrina

Do you see this code in your functions.php file?: ` //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 ?> <?php } // end function `


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
stefanoferruggiara

this is mine.. <?php // Setup -- Probably want to keep this stuff... // Set up action for section registration... add_action('pagelines_register_sections', 'base_sections'); /* Hello! First, lets load the PageLines core so we have access to the functions */ require_once(TEMPLATEPATH . "/core/core.init.php"); // ==================================================== // = BASE FUNCTIONS - Where you should add your code = // ==================================================== // Hooks are a way to easily add custom functions and content to the Platform theme. There are hooks placed strategically throughout the theme // so that you insert code and content with ease. // 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'); add_action('pagelines_branding_icons_end', 'add_icons_to_branding'); // function name function add_icons_to_branding(){ // what the function does??“in this case 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 ?> <?php } // end function // A full list of hooks can be seen by toggling the "advanced" button on each section in the "template setup" option tab. Each hook listed is associated with the section that it is listed under. That's all! Start adding hooks below. /* Register a Drag&Drop HTML Section for the admin. A pullquote section was created here for demonstration purposes Sections should be named: section.[your section name].php and placed in the sections folder. */ function base_sections(){ /* Your custom sections get registered in here... PageLines Register Section Arguments: 1. Section Class Name, 2. Directory name (or filename if in root of 'sections' folder), 3. Init Filename (if different from directory name), 4. Section setup and variable array */ pagelines_register_section('BasePullQuote', 'pullquote', null, array('child' => true) ); pagelines_register_section('BaseSidebar','sb_base', null, array('child' => true) ); }


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
stefanoferruggiara

But its not better give me an email and someone enter in my wp and see with his technical eyes? Is better, more secure, more fast.. and after you post the solution here for help other people! What do you think about it?


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
Kate

Hi Stefano, Under Settings->Appearance->Themes, do you have PlatformBase activated? Or just PlatformPro?

Share this post


Link to post
Share on other sites
stefanoferruggiara

Just platform pro!


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
stefanoferruggiara

Ok Ciao again kate.. now.. let me know.. i wrote a the code that i use for have, in a widget, the fb like box.. a can copy the same code and insert i the code like this? add_action('pagelines_before_branding_icons','add_facebook'); function add_facebook(){ ?> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/StefanoFerruggiaraAllenatoreMentale" width="600" show_faces="false" border_color="#336699" stream="false" header="false"></fb:like-box> <?php } --- and When i do.. i have to insert in function.php at the end right?


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
cmunns

You should have the PlatformBase child theme active Stefano...it should go in the functions.php file of the Base child theme and you can copy the code just as Jimmy had it.

Share this post


Link to post
Share on other sites
stefanoferruggiara

Yes .. now i understand what im not is.. where he write ///Your facebook code he talk about the code that i posted and you can see here?


"Se c'è una sola possibilità.. lo faccio, se non c'è.. la creo!"

Coach Stefano Ferruggiara, Allenatore Fisico & Mentale

Share this post


Link to post
Share on other sites
cmunns

maybe try testing your hook by simple placing ` add_action('pagelines_before_branding_icons','add_facebook'); function add_facebook(){ echo 'test'; } ` if you can see the word test in the header then the hook works and the fb script does not. If you can't see the text near your header then the hook is not in the right place

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

Sign in to follow this  

×