New Paste

 

Recent Pastes

Administrate




PageLines PasteBin.

PasteID: 1da
Pasted by zhonghao, 2012-10-16 23:32:53 GMT
Expires Never
Paste size 1.84 Kb
Toggle Expand   Wrap   Raw
Copy Contents   Copy URL
 
  1. Thanks Danny - 
  2. Here is the code I have used to try and get the weibo icon to show on the page. I practiced with the example given for stumbledupon and it showed up no problem. I'm obviously missing something and would appreciate any help. 
  3. The icon is placed in the images folder as 2 files (two colours) for the hover effect as follows :  ..../platformpro/images/weibofollowus-sml.png and '../platformpro/images/weibofollowushover-sml.png
  4.  
  5. I tried various different combinations of using no repeat and the number of pixels but no luck yet.
  6.  
  7. Thanks
  8.  
  9.  
  10. From functions.php in platformbase
  11.  
  12. // Below is an example of how you would add a social media icon to the icons in header (branding section)
  13. 	// 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 
  14. 	// getting thrown out during the upgrade process. The way to use hooks goes a little like this:
  15.  
  16. 	// add_action('hook_name','function name');
  17.  
  18. 	// ---> uncomment to load 
  19. 	add_action('pagelines_branding_icons_end', 'add_icons_to_branding');
  20.  
  21. 	// function name
  22. 	function add_icons_to_branding(){
  23. 		// 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 
  24. 		// and is the image from the CSS is placed in the images folder
  25. 		?>
  26. 		<a href="http://www.weibo.com/Richard_Brown" class="richardweibo"></a>
  27. 	<?php }
  28. 	// end function
  29.  
  30.  
  31. From style.css in platformbase
  32.  
  33. /* @ CSS corresponding to the hook used in functions.php; adds a stumbleupon icon to branding section */
  34.  
  35. .icons .richardweibo {background: url('../platformpro/images/weibofollowus-sml.png') no repeat 1px 1px;}
  36. .icons .richardweibo:hover {background: url('../platformpro/images/weibofollowushover-sml.png') no repeat 1px 1px;}
  37.  
  38. /* @ Pullquote Section */
  39.  
  40.  
  41.  
 
 
 

 
 
 
 
 
Written by Xan Manning, 2010.
YOU NEED FLASH!