Jump to content
millera4

How do I add additional Social Icons

Recommended Posts

millera4

I am using

PageLines v2.3 and wanted to know How I can add a tumblr and pinterest social icon to the branding section at the top of my website.

I have the images of the pinterest and tumblr social icons already uploaded to what I believe is the right folder:

wp-content/themes/pagelines/sections/branding/

But know i need to find the CSS file or file in which I can change the code to for them to display in the branding section.

Would anyone know the best way to customize this and add more social icons to the branding section ?

should i try to find the main CSS or Php file for this pagelines customization?

Here is my website....I'm still working on it : www.ajmdesign.ca

Share this post


Link to post
Share on other sites
catrina

You'll need to use a hook to add the social icons, but first you need to make sure that you're using the base theme (editing core files isn't allowed): http://www.pagelines.com/wiki/How_to_Use_the_Base_Theme


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
millera4

Thanks for your help Catrina!

I have now installed the base theme, so in the functions php file of the base theme in the apearance edit panel in wordpress can I now add a hook... I only know a little CSS and ...so I was wondering if this linkedin hook I modified from the funtions php file in the branding folder will work...all i changed was the image link to the pinterest image at the end.

.....or should I be writing a totally different code to add the pinterest social icon so I dont have to change the LinkedIn one?

if(ploption('linkedinlink'))

printf('<a target="_blank" href="%s" class="linkedinlink"><img src="%s" alt="LinkedIn"/></a>', ploption('linkedinlink'), $this->base_url.'/pinterest icon.png');

Hope i'm not asking to many things in one post....

Share this post


Link to post
Share on other sites
catrina

You can add different code instead, but it depends on how your want the buttons to function. For example, do you want your Pinterest button to link to your Pinterest page or do you want it to work like a "Pin It" button?


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
millera4

I want the button to send the user to my pinterest page

Share this post


Link to post
Share on other sites
catrina

Okay, then all you had to add is an image link like this:


<a href="http://YOURPINTERESTPAGELINK"><img src="http://DIRECTURLFORPINTERESTICON" border="0"></a>


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
millera4

ahhh...

The site is not showing up now for some reason.... after copied and paste the code i just pressed update at the bottom of the functions.php page in wordpress ....i just wanted to save the code before i found the direct url for the image. after i pressed update the screen went blank with the error message

Parse error: syntax error, unexpected '<' in /home/content/01/7092701/html/wp-content/themes/pagelines-template-theme/functions.php on line 32

....the site is not showing up....either it says the same thing...

Share this post


Link to post
Share on other sites
James B

Hi there, I think you've positioned the code in the wrong place or missed a piece out. In order to get the site back online you'll need to go in via FTP and find the functions.php. Edit that line of code out of the functions.php and re-save.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
mackenzie

Did you make the changes directly to the PHP page or in a hook? We usually suggest no changing PHP files directly and instead use hooks to make the changes.


Mackenzie - PageLines Help Desk

The Centsible Family - Writer, Photographer and Coffee Addict

---------------------------------------------------

Kindly search this forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

Share this post


Link to post
Share on other sites
millera4

ok i fill fix that thanks james

Hi mackenzie...I made changes to the functions php page within wordpress.

Share this post


Link to post
Share on other sites
millera4

Thanks James B! That worked! I see my site again. Now I just need to see if i can add this pinterest button still

Share this post


Link to post
Share on other sites
Rob

First, the functions.php we refer to in hook instructions is always the one in the child theme. We never recommend editing core files. I apologize if there was any confusion about that. Editing core files usually results in errors and a broken site. Please make sure you've not left any changes in any functions.php except the correct one in a child theme.

Just as a primer on hooks, this is from a previous version, but still applies today for the base theme's functions.php (which is where the hook belongs):

// 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.stumbleup...ler/pagelines/" class="stumbleupon"></a>

<?php }

// end function

The corresponding CSS looked like this:

.icons .stumbleupon {background: url('../platformpro/images/sprite-socialicons.png') no-repeat -176px 0;}

.icons .stumbleupon:hover {background: url('../platformpro/images/sprite-socialicons.png') no-repeat -176px -22px;}

Obviously, the URLS for the images are outdated. And the values of the images (-176, etc) would have to be changed


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
millera4

ok so if you go to my website now I have changed the LinkedIn button & Youtube button by changing the png image in the Hooks Section for the social icons in the

section.php file that is located in the branding folder . then i just added the links in the header and footer section in base theme global settings. the problem seems to be resolved.

Share this post


Link to post
Share on other sites
Rob

Excellent.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob

The topic was marked as resolved.

  • Like 1

Former PageLines Moderator, Food Expert and Raconteur

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


  • Similar Content

    • janpeeters
      By janpeeters
      Over the last month I had extensive communications with the developer of the (premium) Anything Boxes section (in Pagelines store) (Adam Munns) and the developer of the WP Polylang Multilingual plugin (Frederic Demarle).
       
      This was because the following problem occurred:
      Anything Boxes showed all posts of two languages (Dutch and English) on the respective static frontpages for each language. It should of course have filtered posts for Dutch language on the Dutch frontpage and English on the English frontpage.
       
      The solution to this problem was simple in the end. When duplicating a page for use in another language the settings for Anything Boxes were not copied to the new page and I should have set these settings manually again on the new page. I wasn't aware of this, but it makes sense. Because of this the pages didn't know how to differentiate between posts from different languages.
       
      The dev of Polylang told me that Polylang is currently smart enough to synchronize metas like Featured images and page templates but it does not work out of the box with metas created by plugins and themes but (according to Frederic) it is rather easy to add them in the list using the filter 'pll_copy_post_metas'.
      He mentions that he is not sure that these 'PageLines Meta Settings' are stored in post meta but that would make sense according to him. He asks if the Pagelines dev team will be interested to support this feature in the future.
       
      I'm also wondering if you will consider adding Polylang translation support for manually editable strings like the 'Read more…' strings in Pagelines Settings.
       
      Well that's of course up to you but I thought to let you know to be able to take this into consideration. I also post this for other users in case they experience the same kind of trouble and are looking for an answer.
       
      Best regards,
      Jan Peeters
    • bankrollbuilder
      By bankrollbuilder
      I used a custom hook to put a banner ad in my header. It works but its not in the right position. it is centered and above my logo and I would like to float it to the right of my logo in the header. heres the link: http://shaboopie.com/shaboopie-wp/free-logos-pg1/

      thanks.

      Dan B.
    • starlit
      By starlit
      Can one have two hero sections on one page?

      I want a landing page which leads/advertises two subpages.

      Or is there another option?

      Please help.

      THANK YOU
    • hutruk
      By hutruk
      Hi!

      I am using the shortcodes for tabs, as described in the documentation.

      When I insert the following code:


      [pl_tabs][pl_tabtitlesection type="tabs"] [pl_tabtitle number="1"]Title 1[/pl_tabtitle] [pl_tabtitle number="2"]Title 2[/pl_tabtitle] [/pl_tabtitlesection] [pl_tabcontentsection] [pl_tabcontent active="yes" number="1"] Lorem ipsum dolor sit amet, consectetur adipiscing elit [/pl_tabcontent] [pl_tabcontent number="2"] Lorem ipsum dolor sit amet, consectetur adipiscing elit [/pl_tabcontent] [/pl_tabcontentsection] [/pl_tabs]

      I get a strange output (in the attachment).

      Any ideas?

      Thanks in advance!

    • MooiWeb
      By MooiWeb
      Hello,

      I would like to align my qtranslate with my breadcrumb so that the flags are on the same hight.
      I'm aware of putting a code in the custom css and tryed severall codes from your site but for now, no succes

      The site i'm working on is http://nieuw.vazdias.nl

      Thx,
      Edwin



×